summaryrefslogtreecommitdiffstats
path: root/ProcessList.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-01-14 10:24:36 +0100
committercgzones <cgzones@googlemail.com>2021-01-15 20:41:10 +0100
commitb9adc30b86ef550655de1e8a8122dae20a6b13df (patch)
tree1c61cd8fe540451c7c9175cc70002a285b286581 /ProcessList.c
parent08ac22ddb9e848123934dad215c58cb03e7ad094 (diff)
RichString: implement safe rewind
The current rewind logic causes issues when rewinding over the short string optimization boundary.
Diffstat (limited to 'ProcessList.c')
-rw-r--r--ProcessList.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ProcessList.c b/ProcessList.c
index 585a9194..4dfbe21d 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -113,7 +113,7 @@ void ProcessList_printHeader(const ProcessList* this, RichString* header) {
RichString_appendWide(header, color, alignedProcessFieldTitle(fields[i]));
if (key == fields[i] && RichString_getCharVal(*header, RichString_size(header) - 1) == ' ') {
- header->chlen--; // rewind to override space
+ RichString_rewind(header, 1); // rewind to override space
RichString_appendnWide(header,
CRT_colors[PANEL_SELECTION_FOCUS],
CRT_treeStr[Settings_getActiveDirection(this->settings) == 1 ? TREE_STR_DESC : TREE_STR_ASC],

© 2014-2024 Faster IT GmbH | imprint | privacy policy