mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-18 10:46:41 +00:00
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>
This commit is contained in:
parent
af8a059bb4
commit
3d3d03479d
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ucode
|
PKG_NAME:=ucode
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
||||||
|
@ -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:
|
Loading…
Reference in New Issue
Block a user