Fix ASAN segfault in RCons.rgbParse()

This commit is contained in:
pancake 2020-02-18 01:04:08 +01:00
parent 258ed8193f
commit 560c59c848

View File

@ -116,9 +116,12 @@ R_API int r_cons_rgb_parse(const char *p, ut8 *r, ut8 *g, ut8 *b, ut8 *a) {
}
if (*p == 0x1b) {
p++;
if (*p != '[') {
p--;
}
}
if (*p != '[') {
p--;
if (!p[0]) {
return 0;
}
switch (p[1]) {
case '1': bold = 255; p += 2; break;