diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/vis.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c index b3909fc4970..8e44ad733c7 100644 --- a/lib/libc/gen/vis.c +++ b/lib/libc/gen/vis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vis.c,v 1.18 2005/08/29 18:38:41 otto Exp $ */ +/* $OpenBSD: vis.c,v 1.19 2005/09/01 17:15:49 millert Exp $ */ /*- * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -104,7 +104,8 @@ vis(char *dst, int c, int flag, int nextc) goto done; } } - if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) { + if (((c & 0177) == ' ') || (flag & VIS_OCTAL) || + ((flag & VIS_GLOB) && (c == '*' || c == '?' || c == '[' || c == '#'))) { *dst++ = '\\'; *dst++ = ((u_char)c >> 6 & 07) + '0'; *dst++ = ((u_char)c >> 3 & 07) + '0'; |