Fixed inline_s32 master
authorRobert Pengelly <robertapengelly@hotmail.com>
Wed, 20 May 2026 16:15:27 +0000 (17:15 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Wed, 20 May 2026 16:15:27 +0000 (17:15 +0100)
Makefile.unix
Makefile.w32
parse.c

index ff6ed36c3edbf958dab60572e5d3a9b81fe35602..d11d5cce6faf7d21e2bfe6aee925c86adb56ce03 100755 (executable)
@@ -5,7 +5,7 @@ SRCDIR              ?=  $(CURDIR)
 VPATH               :=  $(SRCDIR)
 
 CC                  :=  gcc
-CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra -std=c90
+CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra
 
 CC_SRC              :=  $(wildcard $(SRCDIR)/*.c)
 #VERSION             :=  $(shell date '+%Y%m%d')
index 3cc84f462d3dc54a1924e3c20020338291560176..fde40141a31ad56cfc67b9701402d67391fd8929 100755 (executable)
@@ -5,7 +5,7 @@ SRCDIR              ?=  $(CURDIR)
 VPATH               :=  $(SRCDIR)
 
 CC                  :=  gcc
-CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra -std=c90
+CFLAGS              :=  -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror -Wextra
 
 CC_SRC              :=  $(wildcard $(SRCDIR)/*.c)
 
diff --git a/parse.c b/parse.c
index 45a2795a32fe48fceda27b62c1fb855cd1148361..2bcfcc59af9093ac1b051c160f30e9319abb8d06 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -2314,7 +2314,7 @@ static long inline_s32 (long v) {
     unsigned long u = inline_u32 (v);
     
     if (u & 0x80000000UL) {
-        return (long) (u - 0x100000000UL);
+        return -((long) ((~u + 1UL) & 0xffffffffUL));
     }
     
     return (long) u;