From b9adc30b86ef550655de1e8a8122dae20a6b13df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Thu, 14 Jan 2021 10:24:36 +0100 Subject: RichString: implement safe rewind The current rewind logic causes issues when rewinding over the short string optimization boundary. --- ProcessList.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ProcessList.c') 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], -- cgit v1.2.3