Browse Source

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

Mario Zechner 3 years ago
parent
commit
926612b104
1 changed files with 2 additions and 1 deletions
  1. 2 1
      spine-c/spine-c/src/spine/SkeletonBinary.c

+ 2 - 1
spine-c/spine-c/src/spine/SkeletonBinary.c

@@ -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;
 }