diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c
index 6e9b9d65c42e63a037512822c7a14c727e2be832..637809fd84811f75b5e379c7de6c85d76dca9e96 100644
--- a/src/lua_hooklib.c
+++ b/src/lua_hooklib.c
@@ -1982,7 +1982,7 @@ fixed_t LUAh_PlayerHeight(player_t *player)
 	hook_p hookp;
 	fixed_t newheight = -1;
 	if (!gL || !(hooksAvailable[hook_PlayerHeight/8] & (1<<(hook_PlayerHeight%8))))
-		return 0;
+		return newheight;
 
 	lua_settop(gL, 0);
 	lua_pushcfunction(gL, LUA_GetErrorMessage);