Browse Source

Fix love.math.noise(nil) to error instead of returning nil.

Alex Szpakowski 8 years ago
parent
commit
a9593d926e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/math/wrap_Math.lua

+ 1 - 1
src/modules/math/wrap_Math.lua

@@ -88,7 +88,7 @@ function love_math.noise(x, y, z, w)
 		return tonumber(ffifuncs.noise3(x, y, z))
 		return tonumber(ffifuncs.noise3(x, y, z))
 	elseif y ~= nil then
 	elseif y ~= nil then
 		return tonumber(ffifuncs.noise2(x, y))
 		return tonumber(ffifuncs.noise2(x, y))
-	elseif x ~= nil then
+	else
 		return tonumber(ffifuncs.noise1(x))
 		return tonumber(ffifuncs.noise1(x))
 	end
 	end
 end
 end