From 94bd960cc7d67b5336bc991d6506523e334b893e Mon Sep 17 00:00:00 2001 From: vrld Date: Fri, 20 Jan 2012 14:07:22 +0100 Subject: [PATCH] Fix number of arguments check in w_ParticleSystem_setSizes. --- src/modules/graphics/opengl/wrap_ParticleSystem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp index b23639e4b..884f46af4 100644 --- a/src/modules/graphics/opengl/wrap_ParticleSystem.cpp +++ b/src/modules/graphics/opengl/wrap_ParticleSystem.cpp @@ -151,9 +151,10 @@ namespace opengl if (nSizes > 8) return luaL_error(L, "At most eight (8) sizes may be used."); - if (nSizes == 1) + if (nSizes <= 1) { - t->setSize(luax_checkfloat(L, 2)); + float size = luax_checkfloat(L, 2); + t->setSize(size); } else {