Fixed TERRAIN typedefs not being loaded correctly from scripts
@@ -3818,7 +3818,7 @@ bool CItemTypeDef::r_LoadVal(CScript &s)
if ( iVal < 0 )
return false;
- if ( static_cast<size_t>(iVal) < iLo ) // swap
+ if ( (iVal > 0) && (static_cast<size_t>(iVal) < iLo) ) // swap
{
int iTemp = iLo;
iLo = iVal;
