Fix range check for decoded 32bit integer

This commit is contained in:
Richard Frith-Macdonald 2020-12-04 06:04:22 -05:00
parent 60038cbf38
commit 897e5fc7dd

View file

@ -1140,7 +1140,7 @@ scalarSize(char type)
return;
case 4:
*(int32_t*)address = (int32_t)big;
if (big > 2147483647 || big + 2147483648 < 0)
if (big > 2147483647 || big < -2147483648LL)
{
NSLog(@"Lost information converting decoded value to int32_t");
}