From: Tony Crisci Date: Sun, 26 Apr 2015 00:05:55 +0000 (-0400) Subject: Bugfix: serialize con_id with %p in run_binding() X-Git-Tag: 4.10.3~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c1b6c946215d0622a4d414fa191623f40f481362;p=i3%2Fi3 Bugfix: serialize con_id with %p in run_binding() %p is equivalent to either %x or %lx, depending on the pointer size of the platform. Before this commit, we always used %d, which has the same behavior on Linux, but is not automatically expanded to %ld on e.g. FreeBSD. fixes #1661 --- diff --git a/src/bindings.c b/src/bindings.c index cbac2dfd..9a38ba91 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -429,7 +429,7 @@ CommandResult *run_binding(Binding *bind, Con *con) { if (con == NULL) command = sstrdup(bind->command); else - sasprintf(&command, "[con_id=\"%d\"] %s", con, bind->command); + sasprintf(&command, "[con_id=\"%p\"] %s", con, bind->command); Binding *bind_cp = binding_copy(bind); CommandResult *result = parse_command(command, NULL);