1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Document empty string as form name (#14601)

This commit is contained in:
Lars Müller 2024-04-30 13:50:31 +02:00 committed by GitHub
parent ac4f13e78f
commit 2efd0996e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 3 deletions

View file

@ -426,6 +426,10 @@ int ModApiServer::l_show_formspec(lua_State *L)
NO_MAP_LOCK_REQUIRED;
const char *playername = luaL_checkstring(L, 1);
const char *formname = luaL_checkstring(L, 2);
if (*formname == '\0') {
log_deprecated(L, "Deprecated call to `minetest.show_formspec`:"
"`formname` must not be empty");
}
const char *formspec = luaL_checkstring(L, 3);
if(getServer(L)->showFormspec(playername,formspec,formname))