diff options
Diffstat (limited to 'libjava/classpath/gnu/java/net/protocol/file/Connection.java')
-rw-r--r-- | libjava/classpath/gnu/java/net/protocol/file/Connection.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/classpath/gnu/java/net/protocol/file/Connection.java b/libjava/classpath/gnu/java/net/protocol/file/Connection.java index f7253b0935b..04278d46ac0 100644 --- a/libjava/classpath/gnu/java/net/protocol/file/Connection.java +++ b/libjava/classpath/gnu/java/net/protocol/file/Connection.java @@ -160,7 +160,9 @@ public class Connection extends URLConnection else if (c > 127) { try { byte [] c_as_bytes = Character.toString(c).getBytes("utf-8"); - System.arraycopy(c_as_bytes, 0, buf, pos, c_as_bytes.length); + final int c_length = c_as_bytes.length; + System.arraycopy(c_as_bytes, 0, buf, pos, c_length); + pos += c_length; } catch (java.io.UnsupportedEncodingException x2) { throw (Error) new InternalError().initCause(x2); |