Fossil SCM

Fix a compiler warning in th.c introduced by [7d2e4ed653a53696].

drh 2025-04-11 13:00 trunk
Commit e546a2b4573159e74a10d9c7046247e552d51c4a4e484842615527675331ebb5
1 file changed +1 -1
+1 -1
--- src/th.c
+++ src/th.c
@@ -2878,11 +2878,11 @@
28782878
unsigned int uVal = iVal;
28792879
char zBuf[32];
28802880
char *z = &zBuf[32];
28812881
28822882
if( iVal<0 ){
2883
- if( iVal==(-2147483648) ){
2883
+ if( iVal==0x80000000 ){
28842884
return Th_SetResult(interp, "-2147483648", -1);
28852885
}
28862886
isNegative = 1;
28872887
uVal = iVal * -1;
28882888
}
28892889
--- src/th.c
+++ src/th.c
@@ -2878,11 +2878,11 @@
2878 unsigned int uVal = iVal;
2879 char zBuf[32];
2880 char *z = &zBuf[32];
2881
2882 if( iVal<0 ){
2883 if( iVal==(-2147483648) ){
2884 return Th_SetResult(interp, "-2147483648", -1);
2885 }
2886 isNegative = 1;
2887 uVal = iVal * -1;
2888 }
2889
--- src/th.c
+++ src/th.c
@@ -2878,11 +2878,11 @@
2878 unsigned int uVal = iVal;
2879 char zBuf[32];
2880 char *z = &zBuf[32];
2881
2882 if( iVal<0 ){
2883 if( iVal==0x80000000 ){
2884 return Th_SetResult(interp, "-2147483648", -1);
2885 }
2886 isNegative = 1;
2887 uVal = iVal * -1;
2888 }
2889

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button