From 0c3ba556a2d44e0594d8438c41d41b8a561d9e01 Mon Sep 17 00:00:00 2001 From: aiju Date: Thu, 15 Sep 2016 09:13:22 +0000 Subject: pc(1): _ handling in numbers was broken at some point; restore documented behaviour --- sys/src/cmd/pc.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3