Skip to content

Commit

Permalink
#7 use 32bit type for hex functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
davetcc committed Dec 7, 2024
1 parent 0d33ae5 commit 05681d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TextUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ char hexChar(uint8_t val) {
}


void intToHexString(char* buffer, size_t bufferSize, unsigned int input, int digits, bool with0x) {
void intToHexString(char* buffer, size_t bufferSize, uint32_t input, int digits, bool with0x) {
buffer[0] = 0;
if(with0x) {
if(bufferSize < (digits + 3)) {
Expand Down
2 changes: 1 addition & 1 deletion src/TextUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ uint8_t hexValueOf(char val);
* @param digits the number of FIXED digits
* @param with0x if 0x should be included at the beginning
*/
void intToHexString(char* buffer, size_t bufferSize, unsigned int input, int digits, bool with0x);
void intToHexString(char* buffer, size_t bufferSize, uint32_t input, int digits, bool with0x);

/**
* Ensure that a float is always positive.
Expand Down

0 comments on commit 05681d0

Please sign in to comment.