bug fix to printing decimals
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -35,9 +35,9 @@ const char* to_hstring(uint64_t value) {
|
|||||||
for (uint8_t i = 0; i < size; i++) {
|
for (uint8_t i = 0; i < size; i++) {
|
||||||
ptr = ((uint8_t*)valPtr + i);
|
ptr = ((uint8_t*)valPtr + i);
|
||||||
temp = ((*ptr & 0xF0) >> 4);
|
temp = ((*ptr & 0xF0) >> 4);
|
||||||
hexTo_StringOutput[size - (i * 2 + 1)] = temp + (temp > 9 ? 'A' : '0');
|
hexTo_StringOutput[size - (i * 2 + 1)] = temp + (temp > 9 ? 55 : '0');
|
||||||
temp = ((*ptr & 0x0F));
|
temp = ((*ptr & 0x0F));
|
||||||
hexTo_StringOutput[size - (i * 2)] = temp + (temp > 9 ? 'A' : '0');
|
hexTo_StringOutput[size - (i * 2)] = temp + (temp > 9 ? 55 : '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
hexTo_StringOutput[size + 1] = 0;
|
hexTo_StringOutput[size + 1] = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user