Discussion:
patch for bug in colour_fromstring
J Raynor
2015-02-07 22:05:56 UTC
Permalink
The colour_fromstring function intends to accept string values “90" through “97", but doesn’t because it checks incorrectly.

Here’s how it checks “91”:


if (strcasecmp(s, "brightred") == 0 ||
(s[0] == '9' && s[1] == '1' && s[1] == '\0'))
return (91);



Notice it checks s[1] twice, instead of checking s[2].

I’ve attached a patch which fixes the problem.



Also, at http://tmux.sourceforge.net/ <http://tmux.sourceforge.net/>, the “get the development version” link is broken and has been for little while.
Nicholas Marriott
2015-02-07 23:43:50 UTC
Permalink
Fixed, thanks
The colour_fromstring function intends to accept string values ???90" through ???97", but doesn???t because it checks incorrectly.
if (strcasecmp(s, "brightred") == 0 ||
(s[0] == '9' && s[1] == '1' && s[1] == '\0'))
return (91);
Notice it checks s[1] twice, instead of checking s[2].
I???ve attached a patch which fixes the problem.
Also, at http://tmux.sourceforge.net/ <http://tmux.sourceforge.net/>, the ???get the development version??? link is broken and has been for little while.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-users mailing list
https://lists.sourceforge.net/lists/listinfo/tmux-users
Loading...