Fixed native error when using PbReadRepeated* natives for index 0 (bug 5579).

This commit is contained in:
Nicholas Hastings 2013-01-23 11:14:51 -05:00
parent 3a2504dc18
commit 1e5a375203

View File

@ -70,7 +70,7 @@
#define CHECK_REPEATED_ELEMENT(idx) \ #define CHECK_REPEATED_ELEMENT(idx) \
int elemCount = msg->GetReflection()->FieldSize(*msg, field); \ int elemCount = msg->GetReflection()->FieldSize(*msg, field); \
if (elemCount == 0 || idx >= elemCount || idx <= 0) \ if (elemCount == 0 || idx >= elemCount || idx < 0) \
{ \ { \
return false; \ return false; \
} }