updated math functions
This commit is contained in:
@@ -8,7 +8,7 @@ void int_to_hex_string(uint64_t value, char *out, uint8_t num_digits) { // nu
|
||||
out[num_digits] = '\0';
|
||||
}
|
||||
|
||||
void uint16_to_string(uint16_t value, char buffer[17]) {
|
||||
void int_to_string(uint64_t value, char *buffer) {
|
||||
// handle zero case
|
||||
if (value == 0) {
|
||||
buffer[0] = '0';
|
||||
@@ -16,7 +16,7 @@ void uint16_to_string(uint16_t value, char buffer[17]) {
|
||||
}
|
||||
|
||||
uint8_t size = -1;
|
||||
uint16_t copy = value;
|
||||
uint64_t copy = value;
|
||||
|
||||
while (copy) {
|
||||
copy /= 10;
|
||||
@@ -29,4 +29,4 @@ void uint16_to_string(uint16_t value, char buffer[17]) {
|
||||
value /= 10;
|
||||
size--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user