summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_noise.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2013-12-18 16:35:55 -0500
committerShadowNinja <shadowninja@minetest.net>2013-12-18 16:35:55 -0500
commit49cec3f78240ed6310a9b5dd05ce09a79ed5a12e (patch)
tree38e8199e49906357939e74b6ed0b00f6f54de976 /src/script/lua_api/l_noise.cpp
parent38d112033b3ba0ea0360fced334a279576aafc5d (diff)
downloadminetest-49cec3f78240ed6310a9b5dd05ce09a79ed5a12e.tar.gz
minetest-49cec3f78240ed6310a9b5dd05ce09a79ed5a12e.tar.bz2
minetest-49cec3f78240ed6310a9b5dd05ce09a79ed5a12e.zip
Handle LuaErrors in Lua -> C++ calls on LuaJIT
Diffstat (limited to 'src/script/lua_api/l_noise.cpp')
-rw-r--r--src/script/lua_api/l_noise.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_noise.cpp b/src/script/lua_api/l_noise.cpp
index 4b0c7932d..4ca9992af 100644
--- a/src/script/lua_api/l_noise.cpp
+++ b/src/script/lua_api/l_noise.cpp
@@ -330,10 +330,10 @@ int LuaPseudoRandom::l_next(lua_State *L)
max = luaL_checkinteger(L, 3);
if(max < min){
errorstream<<"PseudoRandom.next(): max="<<max<<" min="<<min<<std::endl;
- throw LuaError(L, "PseudoRandom.next(): max < min");
+ throw LuaError(NULL, "PseudoRandom.next(): max < min");
}
if(max - min != 32767 && max - min > 32767/5)
- throw LuaError(L, "PseudoRandom.next() max-min is not 32767"
+ throw LuaError(NULL, "PseudoRandom.next() max-min is not 32767"
" and is > 32768/5. This is disallowed due to"
" the bad random distribution the"
" implementation would otherwise make.");