summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2022-01-29 20:03:56 -0800
committerRosen Penev <rosenp@gmail.com>2022-01-30 23:53:45 -0800
commitd5d8a39b531bdb68cf7567710dfdf7bc21616166 (patch)
tree10c2764688734cdb5f4a7b68b912ec8f33ea3d7c
parenta24de043b205091cf01b4df6b37f5cadf48eed39 (diff)
cmdpad: fix bad scanf format
Signed-off-by: Rosen Penev <rosenp@gmail.com>
-rw-r--r--utils/cmdpad/Makefile2
-rw-r--r--utils/cmdpad/patches/160-format.patch11
2 files changed, 12 insertions, 1 deletions
diff --git a/utils/cmdpad/Makefile b/utils/cmdpad/Makefile
index aa34f31fa..5be2f01bb 100644
--- a/utils/cmdpad/Makefile
+++ b/utils/cmdpad/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=cmdpad
PKG_VERSION:=0.0.3
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=@SF/cmdpad
diff --git a/utils/cmdpad/patches/160-format.patch b/utils/cmdpad/patches/160-format.patch
new file mode 100644
index 000000000..4c4f13db9
--- /dev/null
+++ b/utils/cmdpad/patches/160-format.patch
@@ -0,0 +1,11 @@
+--- a/src/parse.c
++++ b/src/parse.c
+@@ -257,7 +257,7 @@ int ParseCommand( char * pchCommandLine)
+
+ pchValue = strtok( pchValue, ",") ;
+ d2printf( "Value is '%s'\n", pchValue) ;
+- if( (pchValue == NULL ) || ( sscanf( pchValue, "%d", &code) != 1) )
++ if( (pchValue == NULL ) || ( sscanf( pchValue, "%hu", &code) != 1) )
+ return -1 ;
+
+ pchValue = strtok( NULL, ",") ;