aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-01-23 00:51:11 +0100
committerJo-Philipp Wich <jo@mein.io>2022-01-23 00:57:58 +0100
commit3d3d03479d5b4a976cf1320d29f4bd4937d5a4ba (patch)
tree287d83ed36ba719cb656ab3d033fb50ead2209e5 /package
parentaf8a059bb41dd7afee49ce9a5d52e9a8e010bbd8 (diff)
downloadupstream-3d3d03479d5b4a976cf1320d29f4bd4937d5a4ba.tar.gz
upstream-3d3d03479d5b4a976cf1320d29f4bd4937d5a4ba.tar.bz2
upstream-3d3d03479d5b4a976cf1320d29f4bd4937d5a4ba.zip
ucode: add temporary fix for integer formatting on 32bit systems
The ucode VM always passes 64bit integer values to sprintf implementation while the `%d` format expects 32bit integers on 32bit platforms, leading to incorrect formatting results. Temporarily solve the issue by casting the numeric argument to int until a more thorough fix arrives with the next update. Fixes: FS#4234 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package')
-rw-r--r--package/utils/ucode/Makefile2
-rw-r--r--package/utils/ucode/patches/100-fix-int-format-on-32bit-system.patch11
2 files changed, 12 insertions, 1 deletions
diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
index 2c11fe05be..beafb94bb4 100644
--- a/package/utils/ucode/Makefile
+++ b/package/utils/ucode/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ucode
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
diff --git a/package/utils/ucode/patches/100-fix-int-format-on-32bit-system.patch b/package/utils/ucode/patches/100-fix-int-format-on-32bit-system.patch
new file mode 100644
index 0000000000..c557d0c1bd
--- /dev/null
+++ b/package/utils/ucode/patches/100-fix-int-format-on-32bit-system.patch
@@ -0,0 +1,11 @@
+--- a/lib.c
++++ b/lib.c
+@@ -1438,7 +1438,7 @@ uc_printf_common(uc_vm_t *vm, size_t nar
+
+ switch (t) {
+ case UC_INTEGER:
+- ucv_stringbuf_printf(buf, sfmt, arg.n);
++ ucv_stringbuf_printf(buf, sfmt, (int)arg.n);
+ break;
+
+ case UC_DOUBLE: