Changeset - r21003:46baf144d4c8
[Not reviewed]
master
0 1 0
rubidium - 11 years ago 2013-11-24 09:30:30
rubidium@openttd.org
(svn r26080) -Fix: possible out of bounds array access
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/industry_gui.cpp
Show inline comments
 
@@ -1961,7 +1961,7 @@ struct CargoesRow {
 
		assert(cargo_fld->type == CFT_CARGO && label_fld->type == CFT_EMPTY);
 
		for (uint i = 0; i < cargo_fld->u.cargo.num_cargoes; i++) {
 
			int col = cargo_fld->ConnectCargo(cargo_fld->u.cargo.vertical_cargoes[i], !accepting);
 
			cargoes[col] = cargo_fld->u.cargo.vertical_cargoes[i];
 
			if (col >= 0) cargoes[col] = cargo_fld->u.cargo.vertical_cargoes[i];
 
		}
 
		label_fld->MakeCargoLabel(cargoes, lengthof(cargoes), accepting);
 
	}
0 comments (0 inline, 0 general)