]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: fix off by one when copying the hex colorcode (Thanks fernandotcl)
authorMichael Stapelberg <michael@stapelberg.de>
Fri, 21 Oct 2011 22:22:48 +0000 (23:22 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Fri, 21 Oct 2011 22:22:48 +0000 (23:22 +0100)
src/cfgparse.l

index 39e1d3988c15e51fd6e4a910d25b6fca9064aa6e..cd936ac53e8035d36ef42700ed71258155c19bf7 100644 (file)
@@ -138,7 +138,7 @@ EOL     (\r?\n)
 <WANT_STRING>[^\n]+             { yy_pop_state(); yylval.string = sstrdup(yytext); return STR; }
 <OUTPUT_COND>[a-zA-Z0-9_-]+     { yy_pop_state(); yylval.string = sstrdup(yytext); return OUTPUT; }
 ^[ \t]*#[^\n]*                  { return TOKCOMMENT; }
-<COLOR_COND>#[0-9a-fA-F]+       { yy_pop_state(); yylval.string = sstrdup(yytext+1); return HEXCOLOR; }
+<COLOR_COND>#[0-9a-fA-F]+       { yy_pop_state(); yylval.string = sstrdup(yytext); return HEXCOLOR; }
 <ASSIGN_TARGET_COND>[ \t]*→[ \t]*     { BEGIN(WANT_STRING); }
 <ASSIGN_TARGET_COND>[ \t]+      { BEGIN(WANT_STRING); }
 [0-9]+                          { yylval.number = atoi(yytext); return NUMBER; }