fixed array limit check when reading Lua specialtiles table
authorMetaDucky <metaducky AT gmail DOT com>
Thu, 14 Nov 2013 17:31:45 +0000 (18:31 +0100)
committerPilzAdam <pilzadam@minetest.net>
Sat, 16 Nov 2013 14:31:17 +0000 (15:31 +0100)
src/script/common/c_content.cpp

index 2ad4c95656d356cfcd90741432a95eefbc44fe9f..65239ff1f51cc8c1ce7c9fffdc86c3389c0ffcb6 100644 (file)
@@ -334,7 +334,7 @@ ContentFeatures read_content_features(lua_State *L, int index)
                        // removes value, keeps key for next iteration
                        lua_pop(L, 1);
                        i++;
-                       if(i==6){
+                       if(i==CF_SPECIAL_COUNT){
                                lua_pop(L, 1);
                                break;
                        }