zlib: Fix arg error checking
commitcc6d59e7bb61f49c77bd89fbf49815279bcda11a
authorSteve Bennett <steveb@workware.net.au>
Sun, 28 Aug 2016 03:40:12 +0000 (28 13:40 +1000)
committerSteve Bennett <steveb@workware.net.au>
Sun, 28 Aug 2016 03:47:50 +0000 (28 13:47 +1000)
treec0417bae25e70f14af3002536b57a3614f9882b2
parent7f8ca8fbdeb07935001ac46968700ef3b9e2e38a
zlib: Fix arg error checking

It is wrong to call Jim_WrongNumArgs() with argc == 0.
Instead -1 should be returned from the subcmd function to display the standard error message.

Add a --maintainer check for this condition in Jim_WrongNumArgs() and fix the zlib unit tests.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim-zlib.c
jim.c
tests/zlib.test