Skip to content

Commit

Permalink
fix cursed string caching bug w/ AST builder
Browse files Browse the repository at this point in the history
  • Loading branch information
TooManyLimits authored and penguinencounter committed Sep 4, 2024
1 parent 286b547 commit 507f99b
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 507f99b

Please sign in to comment.