fix comparison between signed and unsigned integer expressions in TParseContext::constructorErrorCheck
Issue=78
Contributed by timeless
git-svn-id: https://angleproject.googlecode.com/svn/trunk@502 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/compiler/ParseHelper.cpp b/src/compiler/ParseHelper.cpp
index 430ba53..53f3fa8 100644
--- a/src/compiler/ParseHelper.cpp
+++ b/src/compiler/ParseHelper.cpp
@@ -545,7 +545,7 @@
return true;
}
- if (op == EOpConstructStruct && !type->isArray() && type->getStruct()->size() != function.getParamCount()) {
+ if (op == EOpConstructStruct && !type->isArray() && int(type->getStruct()->size()) != function.getParamCount()) {
error(line, "Number of constructor parameters does not match the number of structure fields", "constructor", "");
return true;
}