Skip to content

Commit

Permalink
change lua_strlen -> lua_rawlen for 5.2 compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
guijan committed Dec 20, 2024
1 parent 6397d33 commit d575cea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/auto4_lua_assfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ namespace {
std::string get_string_field(lua_State *L, const char *name, const char *line_class)
{
get_field(L, name, line_class, lua_isstring);
std::string ret(lua_tostring(L, -1), lua_strlen(L, -1));
std::string ret(lua_tostring(L, -1), lua_rawlen(L, -1));
lua_pop(L, 1);
return ret;
}

agi::Color get_color_field(lua_State *L, const char *name, const char *line_class)
{
get_field(L, name, line_class, lua_isstring);
agi::Color ret(std::string_view(lua_tostring(L, -1), lua_strlen(L, -1)));
agi::Color ret(std::string_view(lua_tostring(L, -1), lua_rawlen(L, -1)));
lua_pop(L, 1);
return ret;
}
Expand Down

0 comments on commit d575cea

Please sign in to comment.