[c] Fix compiler warning/error on MSVC 2019 v16.11.18

This commit is contained in:
Mario Zechner 2022-09-14 10:51:41 +02:00
parent b658634785
commit a50aedd71c

View File

@ -128,7 +128,8 @@ static int readVarint(_dataInput *input, int /*bool*/ optimizePositive) {
}
}
}
if (!optimizePositive) value = (((unsigned int) value >> 1) ^ -(value & 1));
if (!optimizePositive)
value = ((unsigned int) value >> 1) ^ (~(value & 1));
return (int) value;
}