mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
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>
This commit is contained in:
parent
3ebbd193dc
commit
1f1ab4ccbb
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
int
|
||||
needsrcquote(int c)
|
||||
{
|
||||
if(c <= ' ')
|
||||
if(c <= ' ' || c >= 0x80)
|
||||
return 1;
|
||||
if(strchr("`^#*[]=|\\?${}()'<>&;", c))
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue