Commit 9a4d112c by kbr@chromium.org

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
parent 56397df3
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 930
#define BUILD_REVISION 938
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -1463,7 +1463,7 @@ bool TParseContext::structNestingErrorCheck(TSourceLoc line, const TType& fieldT
// 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment