summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/arguments.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-01-18 10:08:05 +0000
committernicm <nicm@openbsd.org>2017-01-18 10:08:05 +0000
commitf50390e0084e3c84e69e2679c4278747c3fca931 (patch)
tree1f0a2829cb121753f22dfd74b6e7c897fe580e26 /usr.bin/tmux/arguments.c
parentRun arguments through vis() as well when printing them. (diff)
downloadwireguard-openbsd-f50390e0084e3c84e69e2679c4278747c3fca931.tar.xz
wireguard-openbsd-f50390e0084e3c84e69e2679c4278747c3fca931.zip
Plain stravis() because it will mangle UTF-8 characters, so add
utf8_stravis() which calls our existing utf8_strvis() and use it instead
Diffstat (limited to 'usr.bin/tmux/arguments.c')
-rw-r--r--usr.bin/tmux/arguments.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c
index a6a8f5872bb..91fa6433b55 100644
--- a/usr.bin/tmux/arguments.c
+++ b/usr.bin/tmux/arguments.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arguments.c,v 1.16 2017/01/18 10:00:50 nicm Exp $ */
+/* $OpenBSD: arguments.c,v 1.17 2017/01/18 10:08:05 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -162,7 +162,7 @@ args_print(struct args *args)
flags = VIS_OCTAL|VIS_TAB|VIS_NL;
if (entry->value[strcspn(entry->value, quoted)] != '\0')
flags |= VIS_DQ;
- stravis(&escaped, entry->value, flags);
+ utf8_stravis(&escaped, entry->value, flags);
if (flags & VIS_DQ)
args_print_add(&buf, &len, "\"%s\"", escaped);
else
@@ -178,7 +178,7 @@ args_print(struct args *args)
flags = VIS_OCTAL|VIS_TAB|VIS_NL;
if (args->argv[i][strcspn(args->argv[i], quoted)] != '\0')
flags |= VIS_DQ;
- stravis(&escaped, args->argv[i], flags);
+ utf8_stravis(&escaped, args->argv[i], flags);
if (flags & VIS_DQ)
args_print_add(&buf, &len, "\"%s\"", escaped);
else