Skip to content

Commit

Permalink
Fix two memleak reports from Coverity (minetest#12466)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahWI authored Jun 26, 2022
1 parent 4b087a0 commit 4163c87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/client/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,7 @@ void Game::processKeyInput()
if (client->modsLoaded())
openConsole(0.2, L".");
else
m_game_ui->showStatusText(wgettext("Client side scripting is disabled"));
m_game_ui->showTranslatedStatusText("Client side scripting is disabled");
} else if (wasKeyDown(KeyType::CONSOLE)) {
openConsole(core::clamp(g_settings->getFloat("console_height"), 0.1f, 1.0f));
} else if (wasKeyDown(KeyType::FREEMOVE)) {
Expand Down
3 changes: 2 additions & 1 deletion src/script/lua_api/l_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,8 @@ int ModApiEnvMod::l_emerge_area(lua_State *L)
sortBoxVerticies(bpmin, bpmax);

size_t num_blocks = VoxelArea(bpmin, bpmax).getVolume();
assert(num_blocks != 0);
if (num_blocks == 0)
return 0;

if (lua_isfunction(L, 3)) {
callback = LuaEmergeAreaCallback;
Expand Down

0 comments on commit 4163c87

Please sign in to comment.