Skip to content

Commit

Permalink
Merge pull request #34 from AnnulusGames/fix-dostring-chunkname
Browse files Browse the repository at this point in the history
Fix: `DoStringAsync` chunkName argument is not reflected when there is a syntax error
  • Loading branch information
yn01-dev authored Oct 14, 2024
2 parents 8d67f25 + c1ad1f8 commit 8501041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lua/LuaStateExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class LuaStateExtensions
{
public static ValueTask<int> DoStringAsync(this LuaState state, string source, Memory<LuaValue> buffer, string? chunkName = null, CancellationToken cancellationToken = default)
{
var syntaxTree = LuaSyntaxTree.Parse(source);
var syntaxTree = LuaSyntaxTree.Parse(source, chunkName);
var chunk = LuaCompiler.Default.Compile(syntaxTree, chunkName);
return state.RunAsync(chunk, buffer, cancellationToken);
}
Expand Down

0 comments on commit 8501041

Please sign in to comment.