diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2011-07-22 13:42:17 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-07-22 18:05:36 +0300 |
commit | 009651675afc775fc77018273a47fb36c28a8100 (patch) | |
tree | 42b87a5e5e3f84694989c31e92f34c5f8dfb57ca | |
parent | ee83d41466ab393d82d9abf57b9ec24d4e6633be (diff) | |
download | qemu-009651675afc775fc77018273a47fb36c28a8100.zip qemu-009651675afc775fc77018273a47fb36c28a8100.tar.gz qemu-009651675afc775fc77018273a47fb36c28a8100.tar.bz2 |
libcacard: s/strip(args++)/strip(args+1)
vcard_emul_options used args = strip(args++) a few times, which
was not returning the expected result since the rest of the code
expected args to be increased by at least 1, which is not the case
if *args is not a blank space when this function is called.
Replace these calls by "strip(args+1)" which will do what we expect.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
-rw-r--r-- | libcacard/vcard_emul_nss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcacard/vcard_emul_nss.c b/libcacard/vcard_emul_nss.c index f1763f5..8c59eff 100644 --- a/libcacard/vcard_emul_nss.c +++ b/libcacard/vcard_emul_nss.c @@ -1171,7 +1171,7 @@ vcard_emul_options(const char *args) args++; continue; } - args = strip(args++); + args = strip(args+1); type_params = args; args = strpbrk(args + 1, ",)"); if (*args == 0) { @@ -1182,7 +1182,7 @@ vcard_emul_options(const char *args) continue; } type_params_length = args - name; - args = strip(args++); + args = strip(args+1); if (*args == 0) { break; } |