This commit is contained in:
Anthony Mercer 2024-05-23 01:12:10 -03:00 committed by GitHub
commit 3419aa1705
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ void hex_to_ascii(int n, char str[]) {
tmp = (n >> i) & 0xF;
if (tmp == 0 && zeros == 0) continue;
zeros = 1;
if (tmp > 0xA) append(str, tmp - 0xA + 'a');
if (tmp >= 0xA) append(str, tmp - 0xA + 'a');
else append(str, tmp + '0');
}

View File

@ -29,7 +29,7 @@ void hex_to_ascii(int n, char str[]) {
tmp = (n >> i) & 0xF;
if (tmp == 0 && zeros == 0) continue;
zeros = 1;
if (tmp > 0xA) append(str, tmp - 0xA + 'a');
if (tmp >= 0xA) append(str, tmp - 0xA + 'a');
else append(str, tmp + '0');
}