diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-01 08:11:37 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-01 08:11:37 +0300 |
commit | 6e797e23b7c3eb2c4df3418ec007f2196cd3ccd4 (patch) | |
tree | a2cfe9c25ecd171ebb639078ffefb3f04bf4fc9b /src/ui/color.c | |
parent | acaa77a888a8d937839431a8295c904a12ed8bdc (diff) |
Text: Fixed color escape ASCII overflow
Diffstat (limited to 'src/ui/color.c')
-rw-r--r-- | src/ui/color.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/color.c b/src/ui/color.c index e6130aad..723e9805 100644 --- a/src/ui/color.c +++ b/src/ui/color.c | |||
@@ -401,7 +401,8 @@ const char *escape_Color(int color) { | |||
401 | if (color >= 0 && color < (int) iElemCount(esc)) { | 401 | if (color >= 0 && color < (int) iElemCount(esc)) { |
402 | return esc[color]; | 402 | return esc[color]; |
403 | } | 403 | } |
404 | return format_CStr("\r%c", color + '0'); | 404 | iAssert(asciiBase_ColorEscape + color <= 127); |
405 | return format_CStr("\r%c", asciiBase_ColorEscape + color); | ||
405 | } | 406 | } |
406 | 407 | ||
407 | iHSLColor setSat_HSLColor(iHSLColor d, float sat) { | 408 | iHSLColor setSat_HSLColor(iHSLColor d, float sat) { |