rewrite lower negative bounds to avoid integer constants underflow of literals

This commit is contained in:
Riccardo Mottola 2020-05-25 23:50:36 +02:00
parent 4dd9fa30ab
commit e7f89135d3

View file

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