Skip to content

Commit

Permalink
Row_printTime() code shrink
Browse files Browse the repository at this point in the history
Shorten a format string ("%1ud" -> "%ud").

Signed-off-by: Kang-Che Sung <[email protected]>
  • Loading branch information
Explorer09 committed Jan 1, 2025
1 parent 21c2c80 commit 16ff93d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Row.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ void Row_printTime(RichString* str, unsigned long long totalHundredths, bool col
unsigned long long totalDays = totalHours / 24;
unsigned int hours = totalHours % 24;
if (totalDays < 10) {
len = xSnprintf(buffer, sizeof(buffer), "%1ud", (unsigned int)totalDays);
len = xSnprintf(buffer, sizeof(buffer), "%ud", (unsigned int)totalDays);
RichString_appendnAscii(str, dayColor, buffer, len);
len = xSnprintf(buffer, sizeof(buffer), "%02uh", hours);
RichString_appendnAscii(str, hourColor, buffer, len);
Expand Down

0 comments on commit 16ff93d

Please sign in to comment.