1
0
mirror of https://github.com/golang/go synced 2024-09-24 17:10:13 -06:00

fix range on invalid utf8 bug

R=r
DELTA=42  (21 added, 20 deleted, 1 changed)
OCL=34328
CL=34333
This commit is contained in:
Russ Cox 2009-09-03 13:56:06 -07:00
parent cf336b10df
commit a18208fb60
2 changed files with 2 additions and 1 deletions

View File

@ -161,8 +161,9 @@ bad:
*rune = Bad;
return 1;
badlen:
// was return 0, but return 1 is more convenient for the runtime.
*rune = Bad;
return 0;
return 1;
}