Unverified Commit 7cd35204 authored by sundb's avatar sundb Committed by GitHub
Browse files

Return ASAP when lua error is string (#11075)

This is a harmless optimization/bug.
When the top of the lua stack is a string, we should not continue to use lua_getfield to get the table fields.
parent beb9746a
...@@ -1553,6 +1553,7 @@ void luaExtractErrorInformation(lua_State *lua, errorInfo *err_info) { ...@@ -1553,6 +1553,7 @@ void luaExtractErrorInformation(lua_State *lua, errorInfo *err_info) {
err_info->line = NULL; err_info->line = NULL;
err_info->source = NULL; err_info->source = NULL;
err_info->ignore_err_stats_update = 0; err_info->ignore_err_stats_update = 0;
return;
} }
lua_getfield(lua, -1, "err"); lua_getfield(lua, -1, "err");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment