From 5c32de43c08c0b35ead53fe7d677ad51b5a5ce95 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sat, 25 Apr 2015 20:05:55 -0400 Subject: [PATCH] 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 --- src/bindings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindings.c b/src/bindings.c index a0ca0498..5815908c 100644 --- a/src/bindings.c +++ b/src/bindings.c @@ -431,7 +431,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);