Skip to content

Commit

Permalink
Merge pull request #256 from penguinencounter/oops-bad-caching
Browse files Browse the repository at this point in the history
Fix cursed string caching bug w/ AST builder
  • Loading branch information
UnlikePaladin authored Sep 5, 2024
2 parents 860a91b + 507f99b commit fab39b9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public void visit(Exp.BinopExp exp) {
public void visit(Exp.Constant exp) {
LuaValue value = exp.value;
if (value instanceof LuaString str) {
String input = new String(str.m_bytes, StandardCharsets.UTF_8);
String input = new String(str.m_bytes, str.m_offset, str.m_length, StandardCharsets.UTF_8);
int sdq = 0;
for (char c : input.toCharArray()) {
if (c == '\'') sdq--;
Expand Down

0 comments on commit fab39b9

Please sign in to comment.