GP-5597 fixed bug where memory search title with control chars breaks

saving tools.
This commit is contained in:
ghidragon
2025-04-15 16:43:40 -04:00
parent 5fb58661b9
commit 203854966d

View File

@@ -48,12 +48,12 @@ class StringSearchFormat extends SearchFormat {
if (charset == StandardCharsets.UTF_16) {
charset = isBigEndian ? StandardCharsets.UTF_16BE : StandardCharsets.UTF_16LE;
}
// Escape sequences in the "input" are 2 Characters long.
String converted = input;
if (settings.useEscapeSequences() && inputLength >= 2) {
input = StringUtilities.convertEscapeSequences(input);
converted = StringUtilities.convertEscapeSequences(input);
}
byte[] bytes = input.getBytes(charset);
byte[] bytes = converted.getBytes(charset);
byte[] maskArray = new byte[bytes.length];
Arrays.fill(maskArray, (byte) 0xff);