mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
plain renderer: return when data is invalid in some cases
This commit is contained in:
parent
82d38ff2be
commit
c4c97a07bd
@ -290,6 +290,7 @@ change_colors(struct screen_char *template, unsigned char *line, int line_pos, i
|
|||||||
goto end;
|
goto end;
|
||||||
default:
|
default:
|
||||||
if (ch >= '0' && ch <= '7') fg = ch - '0';
|
if (ch >= '0' && ch <= '7') fg = ch - '0';
|
||||||
|
else goto end;
|
||||||
color = COLOR_NONE;
|
color = COLOR_NONE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -308,6 +309,7 @@ change_colors(struct screen_char *template, unsigned char *line, int line_pos, i
|
|||||||
goto end;
|
goto end;
|
||||||
default:
|
default:
|
||||||
if (ch >= '0' && ch <= '7') bg = ch - '0';
|
if (ch >= '0' && ch <= '7') bg = ch - '0';
|
||||||
|
else goto end;
|
||||||
color = COLOR_NONE;
|
color = COLOR_NONE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -370,6 +372,7 @@ change_colors(struct screen_char *template, unsigned char *line, int line_pos, i
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (ch >= '0' && ch <= '9') value *= 10 + ch - '0';
|
if (ch >= '0' && ch <= '9') value *= 10 + ch - '0';
|
||||||
|
else goto end;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -397,6 +400,7 @@ change_colors(struct screen_char *template, unsigned char *line, int line_pos, i
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (ch >= '0' && ch <= '9') value *= 10 + ch - '0';
|
if (ch >= '0' && ch <= '9') value *= 10 + ch - '0';
|
||||||
|
else goto end;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user