From bbab1fee4bce0c348a5d1743ac6f70d4f4cb17e5 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Wed, 20 May 2026 17:15:27 +0100 Subject: [PATCH] Fixed inline_s32 --- Makefile.unix | 2 +- Makefile.w32 | 2 +- parse.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.unix b/Makefile.unix index ff6ed36..d11d5cc 100755 --- a/Makefile.unix +++ b/Makefile.unix @@ -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') diff --git a/Makefile.w32 b/Makefile.w32 index 3cc84f4..fde4014 100755 --- a/Makefile.w32 +++ b/Makefile.w32 @@ -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 45a2795..2bcfcc5 100644 --- 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; -- 2.34.1