diff options
Diffstat (limited to 'sources/scalac/symtab/classfile/Pickle.java')
-rw-r--r-- | sources/scalac/symtab/classfile/Pickle.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/scalac/symtab/classfile/Pickle.java b/sources/scalac/symtab/classfile/Pickle.java index 0303666514..1e355faca9 100644 --- a/sources/scalac/symtab/classfile/Pickle.java +++ b/sources/scalac/symtab/classfile/Pickle.java @@ -304,10 +304,11 @@ public class Pickle implements Kinds, Modifiers, EntryTags { private void writeName(Name name) { writeByte(name.isTermName() ? TERMname : TYPEname); writeByte(0); // space for length - while (bp + name.length() > bytes.length) resizeTo(bytes.length * 2); - name.copyAscii(bytes, bp); + byte[] ascii = SourceRepresentation.string2ascii(name.toString()); + while (bp + ascii.length > bytes.length) resizeTo(bytes.length * 2); + System.arraycopy(ascii, 0, bytes, bp, ascii.length); if (debug) System.out.print(name); - bp = bp + name.length(); + bp = bp + ascii.length; } /** Write a symbol entry. |