summaryrefslogtreecommitdiff
path: root/src/ui/color.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-01 08:11:37 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-01 08:11:37 +0300
commit6e797e23b7c3eb2c4df3418ec007f2196cd3ccd4 (patch)
treea2cfe9c25ecd171ebb639078ffefb3f04bf4fc9b /src/ui/color.c
parentacaa77a888a8d937839431a8295c904a12ed8bdc (diff)
Text: Fixed color escape ASCII overflow
Diffstat (limited to 'src/ui/color.c')
-rw-r--r--src/ui/color.c3
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
407iHSLColor setSat_HSLColor(iHSLColor d, float sat) { 408iHSLColor setSat_HSLColor(iHSLColor d, float sat) {