aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mapgen.cpp2
-rw-r--r--src/script/lua_api/l_object.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 784ceabcc..44af7892f 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -604,7 +604,7 @@ int ModApiMapgen::l_get_mapgen_params(lua_State *L)
lua_pushinteger(L, params->chunksize);
lua_setfield(L, -2, "chunksize");
- std::string flagstr = writeFlagString(params->flags, flagdesc_mapgen, (u32)-1);
+ std::string flagstr = writeFlagString(params->flags, flagdesc_mapgen, U32_MAX);
lua_pushstring(L, flagstr.c_str());
lua_setfield(L, -2, "flags");
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 3ac8eeefb..2bd5299dc 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -1187,7 +1187,7 @@ int ObjectRef::l_hud_add(lua_State *L)
}
u32 id = getServer(L)->hudAdd(player, elem);
- if (id == (u32)-1) {
+ if (id == U32_MAX) {
delete elem;
return 0;
}