diff --git a/src/lua_mathlib.c b/src/lua_mathlib.c
index f8b33ffd2ad08bfc10de72dc7e2195e91a2bd9c6..b01561574119c37bb2a6fbe8be2af0edd6915b1d 100644
--- a/src/lua_mathlib.c
+++ b/src/lua_mathlib.c
@@ -156,7 +156,7 @@ static int lib_getsecspecial(lua_State *L)
 
 static int lib_all7emeralds(lua_State *L)
 {
-	lua_pushinteger(L, ALL7EMERALDS(luaL_checkinteger(L, 1)));
+	lua_pushboolean(L, ALL7EMERALDS(luaL_checkinteger(L, 1)));
 	return 1;
 }