aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/rune.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/rune.c')
-rw-r--r--src/runtime/rune.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/rune.c b/src/runtime/rune.c
index d705a5e36f..5738ca3646 100644
--- a/src/runtime/rune.c
+++ b/src/runtime/rune.c
@@ -235,9 +235,9 @@ sys·bytestorune(byte *str, int32 off, int32 length, int32 outrune, int32 outcou
}
void
-sys·stringtorune(string str, int32 off, int32 length, int32 outrune, int32 outcount)
+sys·stringtorune(string str, int32 off, int32 outrune, int32 outcount)
{
- outcount = charntorune(&outrune, str->str + off, length);
+ outcount = charntorune(&outrune, str->str + off, str->len - off);
FLUSH(&outrune);
FLUSH(&outcount);
}