Make tohex() work as expected.

This commit is contained in:
Andrey V. Elsukov 2016-01-09 08:04:29 +00:00
parent 06ddd0b7ac
commit 6299675b9f

View File

@ -46,7 +46,7 @@ tohex(char **buf, int len, uint32_t val)
char *walker = *buf;
int i;
for (i = len - 1; i >= 0; i++) {
for (i = len - 1; i >= 0; i--) {
walker[i] = hexstr[val & 0xf];
val >>= 4;
}