commit | 9a4d112c28fe2f636d8ed9f327ca4382028eb33e | [log] [tgz] |
---|---|---|
author | kbr@chromium.org <kbr@chromium.org@736b8ea6-26fd-11df-bfd4-992fa37f6226> | Thu Jan 05 20:06:28 2012 +0000 |
committer | kbr@chromium.org <kbr@chromium.org@736b8ea6-26fd-11df-bfd4-992fa37f6226> | Thu Jan 05 20:06:28 2012 +0000 |
tree | ceee15ce02fcca819706d0660ab0fed785693bd9 | |
parent | 56397df38365335d2c0726239a8faf917568375d [diff] |
Fix off-by-one error in enforcement of WebGL's maximum struct nesting. BUG=http://code.google.com/p/angleproject/issues/detail?id=275 TEST=WebGL conformance suite TBR=nicolas Review URL: http://codereview.appspot.com/5520049 git-svn-id: https://angleproject.googlecode.com/svn/trunk@938 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp index 529fbef..431f8d1 100644 --- a/src/compiler/ParseHelper.cpp +++ b/src/compiler/ParseHelper.cpp
@@ -1463,7 +1463,7 @@ // We're already inside a structure definition at this point, so add // one to the field's struct nesting. - if (1 + fieldType.getDeepestStructNesting() >= kWebGLMaxStructNesting) { + if (1 + fieldType.getDeepestStructNesting() > kWebGLMaxStructNesting) { error(line, "", "", "Reference of struct type %s exceeds maximum struct nesting of %d", fieldType.getTypeName().c_str(), kWebGLMaxStructNesting); return true;