changeset: 2773:a10d01316287
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Tue Jul 27 14:45:42 2010 -0400
files: cmd/wmii/message.c
description:
Don't allow extra content after colors ctl commands.
diff -r c134f0c0f195 -r a10d01316287 cmd/wmii/message.c
--- a/cmd/wmii/message.c Tue Jul 27 14:30:24 2010 -0400
+++ b/cmd/wmii/message.c Tue Jul 27 14:45:42 2010 -0400
@@ -906,15 +906,15 @@
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)
+ n = loadcolor(&tpl, m->pos, m->end);
+ m->pos += n;
+ if(n == 0 || msg_getword(m, nil))
error(Ebad);
-
- m->pos += n;
- msg_eatrunes(m, isspacerune, true);
+ *col = tpl;
}
char*
Received on Tue Jul 27 2010 - 20:46:01 CEST
This archive was generated by hypermail 2.2.0 : Tue Jul 27 2010 - 20:48:04 CEST