From: Michael Schroeder Date: Fri, 26 Feb 2016 12:40:28 +0000 (+0100) Subject: solv_hex2bin: don't eat nibbles X-Git-Tag: 0.6.20~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cebb81db05fd9281a6d482adce25c93605ed5da;p=thirdparty%2Flibsolv.git solv_hex2bin: don't eat nibbles --- diff --git a/src/util.c b/src/util.c index d611297e..b2e91797 100644 --- a/src/util.c +++ b/src/util.c @@ -235,7 +235,7 @@ solv_hex2bin(const char **strp, unsigned char *buf, int bufl) d = c - ('A' - 10); else break; - c = *++str; + c = str[1]; d <<= 4; if (c >= '0' && c <= '9') d |= c - '0'; @@ -246,7 +246,7 @@ solv_hex2bin(const char **strp, unsigned char *buf, int bufl) else break; buf[i] = d; - ++str; + str += 2; } *strp = str; return i;