Fix truncation warning for F1000_MIN, F1000_MAX
authorsfan5 <sfan5@live.de>
Sun, 26 Apr 2020 18:59:55 +0000 (20:59 +0200)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Mon, 27 Apr 2020 04:58:34 +0000 (06:58 +0200)
src/util/serialize.h

index 8ef0ad1c2c0b2602fd7d4a433750736c918f48b2..a4b5a234a62fda4e72b91fbf122d7d3831c5c04c 100644 (file)
@@ -52,8 +52,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 // not represent the full range, but rather the largest safe range, of values on
 // all supported architectures.  Note: This definition makes assumptions on
 // platform float-to-int conversion behavior.
-#define F1000_MIN ((float)(s32)((-0x7FFFFFFF - 1) / FIXEDPOINT_FACTOR))
-#define F1000_MAX ((float)(s32)((0x7FFFFFFF) / FIXEDPOINT_FACTOR))
+#define F1000_MIN ((float)(s32)((float)(-0x7FFFFFFF - 1) / FIXEDPOINT_FACTOR))
+#define F1000_MAX ((float)(s32)((float)(0x7FFFFFFF) / FIXEDPOINT_FACTOR))
 
 #define STRING_MAX_LEN 0xFFFF
 #define WIDE_STRING_MAX_LEN 0xFFFF