Don't allow extra content after colors ctl commands.

This commit is contained in:
Kris Maglione 2010-07-27 14:45:42 -04:00
parent 366420f459
commit 05053cb995

View File

@ -906,15 +906,15 @@ msg_nudge(View *v, IxpMsg *m) {
void
msg_parsecolors(IxpMsg *m, CTuple *col) {
CTuple tpl;
static char Ebad[] = "bad color string";
char n;
n = loadcolor(col, m->pos, m->end);
if(n == 0)
error(Ebad);
n = loadcolor(&tpl, m->pos, m->end);
m->pos += n;
msg_eatrunes(m, isspacerune, true);
if(n == 0 || msg_getword(m, nil))
error(Ebad);
*col = tpl;
}
char*