summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/getcap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/gen/getcap.c b/lib/libc/gen/getcap.c
index 2a81a35..f883ec4 100644
--- a/lib/libc/gen/getcap.c
+++ b/lib/libc/gen/getcap.c
@@ -810,7 +810,11 @@ cgetstr(buf, cap, str)
bp++;
if (*bp == ':' || *bp == '\0')
break; /* drop unfinished escape */
- *mp++ = *bp++ & 037;
+ if (*bp == '?') {
+ *mp++ = '\177';
+ bp++;
+ } else
+ *mp++ = *bp++ & 037;
} else if (*bp == '\\') {
bp++;
if (*bp == ':' || *bp == '\0')
OpenPOWER on IntegriCloud