cmdpad: fix bad scanf format
authorRosen Penev <rosenp@gmail.com>
Sun, 30 Jan 2022 04:03:56 +0000 (20:03 -0800)
committerRosen Penev <rosenp@gmail.com>
Mon, 31 Jan 2022 07:53:45 +0000 (23:53 -0800)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/cmdpad/Makefile
utils/cmdpad/patches/160-format.patch [new file with mode: 0644]

index aa34f31fa6e238d942234f117567c5de377ffb1a..5be2f01bb58b7224cc5883ada15ed154026875d4 100644 (file)
@@ -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 (file)
index 0000000..4c4f13d
--- /dev/null
@@ -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, ",") ;