aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp7
-rw-r--r--src/scriptapi.cpp4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 588a0fef3..e923cbbb0 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2482,7 +2482,9 @@ void the_game(
// Sign special case, at least until formspec is properly implemented.
// Deprecated?
- if(meta && meta->getString("formspec") == "hack:sign_text_input" && !random_input)
+ if(meta && meta->getString("formspec") == "hack:sign_text_input"
+ && !random_input
+ && !input->isKeyDown(getKeySetting("keymap_sneak")))
{
infostream<<"Launching metadata text input"<<std::endl;
@@ -2497,7 +2499,8 @@ void the_game(
wtext))->drop();
}
// If metadata provides an inventory view, activate it
- else if(meta && meta->getString("formspec") != "" && !random_input)
+ else if(meta && meta->getString("formspec") != "" && !random_input
+ && !input->isKeyDown(getKeySetting("keymap_sneak")))
{
infostream<<"Launching custom inventory view"<<std::endl;
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index 13ba72056..6e2a0a314 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -4428,8 +4428,8 @@ static int l_log(lua_State *L)
}
else
{
- std::string levelname = lua_tostring(L, 1);
- text = lua_tostring(L, 2);
+ std::string levelname = luaL_checkstring(L, 1);
+ text = luaL_checkstring(L, 2);
if(levelname == "error")
level = LMT_ERROR;
else if(levelname == "action")