Changeset - r26722:ffa941789896
[Not reviewed]
master
0 2 0
Rubidium - 23 months ago 2023-01-02 21:51:21
rubidium@openttd.org
Fix: comparison of narrow type with wide type in loop condition

Technically this can't be triggered with the currently returned values though.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/saveload/station_sl.cpp
Show inline comments
 
@@ -392,7 +392,7 @@ public:
 
		}
 

	
 
		size_t num_cargo = this->GetNumCargo();
 
		for (CargoID i = 0; i < num_cargo; i++) {
 
		for (size_t i = 0; i < num_cargo; i++) {
 
			GoodsEntry *ge = &st->goods[i];
 
			SlObject(ge, this->GetLoadDescription());
 
			if (IsSavegameVersionBefore(SLV_183)) {
src/saveload/town_sl.cpp
Show inline comments
 
@@ -148,7 +148,7 @@ public:
 
	void Load(Town *t) const override
 
	{
 
		size_t num_cargo = this->GetNumCargo();
 
		for (CargoID i = 0; i < num_cargo; i++) {
 
		for (size_t i = 0; i < num_cargo; i++) {
 
			SlObject(&t->supplied[i], this->GetLoadDescription());
 
		}
 
	}
0 comments (0 inline, 0 general)