summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2015-12-23 13:20:02 +0100
committerMarcus Meissner <marcus@jet.franken.de>2015-12-23 19:15:18 +0100
commiteb263d2683132b7ff1b763f7b01d4b684f4b6b40 (patch)
tree89914b00dd4fd20e557da831235a89835a0a1f6f
parent813c95e7405d6595d3b2278588f51c323f4dc08b (diff)
downloadlibgphoto2-eb263d2683132b7ff1b763f7b01d4b684f4b6b40.tar.gz
handle arguments in opcode config correctly
-rw-r--r--camlibs/ptp2/config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/camlibs/ptp2/config.c b/camlibs/ptp2/config.c
index d6eea5cb7..d53f0d955 100644
--- a/camlibs/ptp2/config.c
+++ b/camlibs/ptp2/config.c
@@ -5689,7 +5689,8 @@ _put_Generic_OPCode(CONFIG_PUT_ARGS)
return GP_ERROR_BAD_PARAMETERS;
nparams = 0; x = val;
while ((x = strchr(x,',')) && (nparams<5)) {
- if (!sscanf(val,"0x%x", &xparams[nparams]))
+ x++;
+ if (!sscanf(x,"0x%x", &xparams[nparams]))
return GP_ERROR_BAD_PARAMETERS;
nparams++;
}