# HG changeset patch # User fonsinchen # Date 2013-08-10 12:47:13 # Node ID 08cd60b729118773c797122df96b80166f78fcef # Parent c15fc236f61ae681425efc0abe28618a8066cbb0 (svn r25709) -Fix: don't return -1 as unsigned diff --git a/src/script/api/script_town.cpp b/src/script/api/script_town.cpp --- a/src/script/api/script_town.cpp +++ b/src/script/api/script_town.cpp @@ -120,8 +120,8 @@ /* static */ uint32 ScriptTown::GetCargoGoal(TownID town_id, ScriptCargo::TownEffect towneffect_id) { - if (!IsValidTown(town_id)) return -1; - if (!ScriptCargo::IsValidTownEffect(towneffect_id)) return -1; + if (!IsValidTown(town_id)) return UINT32_MAX; + if (!ScriptCargo::IsValidTownEffect(towneffect_id)) return UINT32_MAX; const Town *t = ::Town::Get(town_id);