onefile fix

This commit is contained in:
nhmall
2024-03-29 07:02:04 -04:00
parent e4ffda7386
commit af3a0db083
7 changed files with 16 additions and 10 deletions
+3 -3
View File
@@ -146,7 +146,7 @@ crashreport_init(int argc UNUSED, char *argv[] UNUSED)
goto skip;
close(fd);
static const char hex[] = "0123456789abcdef";
static const char hexdigits[] = "0123456789abcdef";
char *p = bid;
unsigned char *in;
HASH_RESULT(ctxp, &in);
@@ -158,8 +158,8 @@ crashreport_init(int argc UNUSED, char *argv[] UNUSED)
cnt = (uint8) sizeof bid / 2 - 1;
while (cnt) {
/* sprintf(p, "%02x", *in++), p += 2; */
*p++ = hex[(*in >> 4) & 0x0f];
*p++ = hex[*in++ & 0x0f];
*p++ = hexdigits[(*in >> 4) & 0x0f];
*p++ = hexdigits[*in++ & 0x0f];
--cnt;
}
*p = '\0';