diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-01-15 18:48:32 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2024-01-20 11:53:25 +0100 |
commit | e401c8fed95a212fde43b295ea08c2ae81429507 (patch) | |
tree | 9e3bc4f06a5a65d8e7380a22ef0c74b3d5b03085 | |
parent | 2f67a2b07d99e9f496d68ad49be9ec517946bcc7 (diff) |
Fix usage of RichString_appendnWide()
The last argument of RichString_appendnWide() should be the number of
bytes of the source multi-byte string, not the number of characters in
the resulting wide-character string.
-rw-r--r-- | Table.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -308,10 +308,9 @@ void Table_printHeader(const Settings* settings, RichString* header) { if (key == fields[i] && RichString_getCharVal(*header, RichString_size(header) - 1) == ' ') { bool ascending = ScreenSettings_getActiveDirection(ss) == 1; RichString_rewind(header, 1); // rewind to override space - RichString_appendnWide(header, + RichString_appendWide(header, CRT_colors[PANEL_SELECTION_FOCUS], - CRT_treeStr[ascending ? TREE_STR_ASC : TREE_STR_DESC], - 1); + CRT_treeStr[ascending ? TREE_STR_ASC : TREE_STR_DESC]); } if (COMM == fields[i] && settings->showMergedCommand) { RichString_appendAscii(header, color, "(merged)"); |