Skip to content

Commit

Permalink
Use RichString_appendnAscii() for CPU frequency text
Browse files Browse the repository at this point in the history
The text buffer contains no characters outside ASCII range, thus there
is no need to use RichString_appendnWide().

Signed-off-by: Kang-Che Sung <[email protected]>
  • Loading branch information
Explorer09 committed Feb 5, 2025
1 parent e8d0eae commit 0b8e91b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CPUMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static void CPUMeter_display(const Object* cast, RichString* out) {
len = xSnprintf(cpuFrequencyBuffer, sizeof(cpuFrequencyBuffer), "N/A ");
}
RichString_appendAscii(out, CRT_colors[METER_TEXT], "freq: ");
RichString_appendnWide(out, CRT_colors[METER_VALUE], cpuFrequencyBuffer, len);
RichString_appendnAscii(out, CRT_colors[METER_VALUE], cpuFrequencyBuffer, len);
}

#ifdef BUILD_WITH_CPU_TEMP
Expand Down

0 comments on commit 0b8e91b

Please sign in to comment.