mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
16 lines
426 B
Diff
16 lines
426 B
Diff
diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc
|
|
index 0a22ba1..9862949 100644
|
|
--- a/src/draco/io/parser_utils.cc
|
|
+++ b/src/draco/io/parser_utils.cc
|
|
@@ -150,7 +150,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) {
|
|
uint32_t v;
|
|
if (!ParseUnsignedInt(buffer, &v))
|
|
return false;
|
|
- *value = (sign < 0) ? -v : v;
|
|
+ if (sign < 0)
|
|
+ v *= -1;
|
|
+ *value = v;
|
|
return true;
|
|
}
|
|
|