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
This commit is contained in:
Tony Crisci 2015-04-25 20:05:55 -04:00 committed by Michael Stapelberg
parent c0dbc5dd77
commit c1b6c94621
1 changed files with 1 additions and 1 deletions

View File

@ -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);