ref: 0c3ba556a2d44e0594d8438c41d41b8a561d9e01
parent: 07284c41f6c4ca6b48e0a6ef389d867bdba2bb57
author: aiju <devnull@localhost>
date: Thu Sep 15 05:13:22 EDT 2016
pc(1): _ handling in numbers was broken at some point; restore documented behaviour
--- a/sys/src/cmd/pc.y
+++ b/sys/src/cmd/pc.y
@@ -527,7 +527,7 @@
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);