From 8f90b8448b016da41bef32baf0a53aabe3f294b3 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 22 Nov 2015 13:32:21 -0500 Subject: [PATCH] Bug: parse con_id base 16 Mouse bindings that target the window that was clicked send the command to the parser with `con_id` of the clicked window serialized base 16 for compatability with FreeBSD. See 7c2842e for explaination. Set base to 0 for strtol to handle base 16 numbers for that reason. This allows mouse bindings that target specific windows to work correctly. Without this change, the focused window is always targetted rather than the window that was actually clicked. Regression introduced in b744c5e. --- src/match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/match.c b/src/match.c index 1cdd478f..950e0fe3 100644 --- a/src/match.c +++ b/src/match.c @@ -280,7 +280,7 @@ void match_parse_property(Match *match, const char *ctype, const char *cvalue) { } char *end; - long parsed = strtol(cvalue, &end, 10); + long parsed = strtol(cvalue, &end, 0); if (parsed == LONG_MIN || parsed == LONG_MAX || parsed < 0 ||