summaryrefslogtreecommitdiff
path: root/strgen
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-08-28 14:45:44 +0000
committertron <tron@openttd.org>2005-08-28 14:45:44 +0000
commita02ee8ffda354231316d950ea4bdf457e075e4c4 (patch)
tree37697e0dd8ca9c072fe6a29a2a1fd9e7233be0f1 /strgen
parentd975abc96c4eabd4a1053ee21f2b6951779a87c4 (diff)
downloadopenttd-a02ee8ffda354231316d950ea4bdf457e075e4c4.tar.xz
(svn r2900) Fix a bug, which incremented the counter of a loop twice and therefore calculated wrong argument indices
Diffstat (limited to 'strgen')
-rw-r--r--strgen/strgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strgen/strgen.c b/strgen/strgen.c
index abe879f68..719f91833 100644
--- a/strgen/strgen.c
+++ b/strgen/strgen.c
@@ -1006,7 +1006,7 @@ static int TranslateArgumentIdx(int argidx)
Fatal("invalid argidx %d", argidx);
for(i = sum = 0; i < argidx; i++) {
- const CmdStruct *cs = _cur_pcs.cmd[i++];
+ const CmdStruct *cs = _cur_pcs.cmd[i];
sum += cs ? cs->consumes : 1;
}