mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r2900) Fix a bug, which incremented the counter of a loop twice and therefore calculated wrong argument indices
This commit is contained in:
parent
d975abc96c
commit
a02ee8ffda
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue