From bc6fa279a4adb9326939b392cd46157d1ae2c078 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Fri, 4 Jul 2014 20:28:58 +0200 Subject: [PATCH] don't accept variablenames with index > max_loop making them default to game_config::max_loop isn't useful im most cases. --- src/variable_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variable_info.cpp b/src/variable_info.cpp index 3f1c55546dbf..3768d6cb3d43 100644 --- a/src/variable_info.cpp +++ b/src/variable_info.cpp @@ -164,7 +164,7 @@ namespace } if(res > int(game_config::max_loop)) { - res = game_config::max_loop; + throw invalid_variablename_exception(); } return res; }