summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2016-09-15 09:13:22 +0000
committeraiju <devnull@localhost>2016-09-15 09:13:22 +0000
commit0c3ba556a2d44e0594d8438c41d41b8a561d9e01 (patch)
tree0d348aae859326c92b13a01c52384e437aec52ab
parent07284c41f6c4ca6b48e0a6ef389d867bdba2bb57 (diff)
pc(1): _ handling in numbers was broken at some point; restore documented behaviour
-rw-r--r--sys/src/cmd/pc.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/pc.y b/sys/src/cmd/pc.y
index 331f35f35..e7eafad79 100644
--- a/sys/src/cmd/pc.y
+++ b/sys/src/cmd/pc.y
@@ -527,7 +527,7 @@ yylex(void)
if(c == '\n') prompted = 0;
if(isdigit(c)){
for(p = buf, *p++ = c; c = Bgetc(in), isalnum(c) || c == '_'; )
- if(p < buf + sizeof(buf) - 1)
+ if(p < buf + sizeof(buf) - 1 && c != '_')
*p++ = c;
*p = 0;
Bungetc(in);