1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-26 07:59:09 +00:00

(svn r2900) Fix a bug, which incremented the counter of a loop twice and therefore calculated wrong argument indices

This commit is contained in:
tron
2005-08-28 14:45:44 +00:00
parent d975abc96c
commit a02ee8ffda

View File

@@ -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;
}