diff options
author | George Kadianakis <desnacked@riseup.net> | 2012-04-03 16:20:24 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2012-04-03 16:20:24 +0200 |
commit | b80728a115213abfaab6b3a124caac617ce5d253 (patch) | |
tree | 2c34856933d9c53e9c6d1f2895f741baf90d0485 /src/common/util.c | |
parent | 42143979d8c594525583ea8de15abf18636f78b1 (diff) | |
download | tor-b80728a115213abfaab6b3a124caac617ce5d253.tar.gz tor-b80728a115213abfaab6b3a124caac617ce5d253.zip |
tor_vsscanf(): Don't return -1 if '%%' doesn't match.
tor_vsscanf() is supposed to return the current number of matches on
match failure.
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c index 266368cc9d..551ee1796f 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -2773,7 +2773,7 @@ tor_vsscanf(const char *buf, const char *pattern, va_list ap) ++n_matched; } else if (*pattern == '%') { if (*buf != '%') - return -1; + return n_matched; ++buf; ++pattern; } else { |