ayaports/backports/shntool/shntool-3.0.10-large-size.patch

24 lines
878 B
Diff
Raw Permalink Normal View History

2023-01-11 00:40:45 +00:00
diff -aur shntool-3.0.10-clean/src/core_fileio.c shntool-3.0.10-size/src/core_fileio.c
--- shntool-3.0.10-clean/src/core_fileio.c 2009-03-11 17:18:01.000000000 +0000
+++ shntool-3.0.10-size/src/core_fileio.c 2012-08-11 17:20:14.000000000 +0100
@@ -110,10 +110,16 @@
2021-06-04 15:24:22 +00:00
buf[4] = 0;
if (be_val)
- *be_val = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
+ *be_val = (((unsigned long)buf[0]) << 24)
+ | (((unsigned long)buf[1]) << 16)
+ | (((unsigned long)buf[2]) << 8)
+ | ((unsigned long)buf[3]);
if (le_val)
- *le_val = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
+ *le_val = (((unsigned long)buf[3]) << 24)
+ | (((unsigned long)buf[2]) << 16)
+ | (((unsigned long)buf[1]) << 8)
+ | ((unsigned long)buf[0]);
if (tag_val)
tagcpy(tag_val,buf);
2023-01-11 00:40:45 +00:00