Re: [PATCH] xterm-keys: fix xterm_keys_match to properly recognize partial matches

2014-01-31 Thread Nicholas Marriott
Applied, thanks. On Sun, Jan 26, 2014 at 07:09:40PM +0100, m0viefreak wrote: > In case of a partial match (cases where buf is shorter than > template) the loop was comparing one character too much, ending up > with comparing \0 in buf which would fail. > Fix: change pos++ to ++pos > > The increm

[PATCH] xterm-keys: fix xterm_keys_match to properly recognize partial matches

2014-01-27 Thread m0viefreak
In case of a partial match (cases where buf is shorter than template) the loop was comparing one character too much, ending up with comparing \0 in buf which would fail. Fix: change pos++ to ++pos The incrementation of the template counter has to be done always, so the conditions in the loop need