Skip to content

Commit

Permalink
Merge pull request #21 from mlepage-google/master
Browse files Browse the repository at this point in the history
Add const qualifier to temp pointer to fix warning
  • Loading branch information
jeremyjh committed Jul 24, 2020
2 parents 42cadf2 + 3351a89 commit a1ece2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/tft/tft.c
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ int TFT_getStringWidth(const char *str)
else if (tft_cfont.x_size != 0) strWidth = strlen(str) * tft_cfont.x_size; // fixed width font
else {
// calculate the width of the string of proportional characters
char *tempStrptr = str;
const char *tempStrptr = str;
while (*tempStrptr != 0) {
if (getCharPtr(*tempStrptr++)) {
strWidth += (((fontChar.width > fontChar.xDelta) ? fontChar.width : fontChar.xDelta) + 1);
Expand Down

0 comments on commit a1ece2c

Please sign in to comment.