Skip to content

Commit

Permalink
Need to use preciseLength here to avoid too-short stream.
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Mar 23, 2015
1 parent 911c6c0 commit b9b728b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyString.java
Expand Up @@ -5935,7 +5935,7 @@ else if (encidx == UTF32LEEncoding.INSTANCE) {
}

while (p < e) {
int ret = enc.length(pBytes, p, e);
int ret = StringSupport.preciseLength(enc, pBytes, p, e);
if (MBCLEN_NEEDMORE_P(ret)) {
break;
}
Expand Down

0 comments on commit b9b728b

Please sign in to comment.