aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2017-06-19 09:50:14 -0400
committerRuss Cox <rsc@swtch.com>2017-06-19 13:51:23 +0000
commit1f1ab4ccbbec9c92b780f6a60ff9730126659a87 (patch)
treed6b5a615cfca88f897ec286508b481a8bfe91e21 /src
parent3ebbd193dce0724e106ec9af627a3782676ae510 (diff)
downloadplan9port-1f1ab4ccbbec9c92b780f6a60ff9730126659a87.tar.gz
plan9port-1f1ab4ccbbec9c92b780f6a60ff9730126659a87.tar.bz2
plan9port-1f1ab4ccbbec9c92b780f6a60ff9730126659a87.zip
lib9: fix needsrcquote
As written, it is passing a rune to strchr, which likely ignores all but the bottom 8 bits of the rune. Long-standing Plan 9 bug too. Fixes #87. Change-Id: I6a833373b308bed8760d6989972c7f77b4ef3838 Reviewed-on: https://plan9port-review.googlesource.com/2921 Reviewed-by: Russ Cox <rsc@swtch.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib9/needsrcquote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib9/needsrcquote.c b/src/lib9/needsrcquote.c
index f4cf460c..a9e62bc6 100644
--- a/src/lib9/needsrcquote.c
+++ b/src/lib9/needsrcquote.c
@@ -4,7 +4,7 @@
int
needsrcquote(int c)
{
- if(c <= ' ')
+ if(c <= ' ' || c >= 0x80)
return 1;
if(strchr("`^#*[]=|\\?${}()'<>&;", c))
return 1;