Skip to content

Commit

Permalink
Merge pull request #647 from dkimitsa/fix/debug/crash_on_non_ascii_names
Browse files Browse the repository at this point in the history
* fixed: debugger crash if method/field contains non ansi characters in name
  • Loading branch information
Tom-Ski authored Apr 19, 2022
2 parents 31cc0e5 + b543a74 commit ff6c0e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,13 @@ public static void dumpDebugInfoAsText(RawData debugInfo, File file) {
// }

private static void putStringWithLen(DataOutputStream stream, String str) throws IOException {
stream.writeInt(str.length());
if (!str.isEmpty())
stream.write(str.getBytes());
if (!str.isEmpty()) {
byte[] bytes = str.getBytes();
stream.writeInt(bytes.length);
stream.write(bytes);
} else {
stream.writeInt(0);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public int readInt32() {

@Override
public long readLong() {
return activeRegion.readInt32();
return activeRegion.readLong();
}

@Override
Expand Down

0 comments on commit ff6c0e7

Please sign in to comment.