Fix #14488: Crash when building too many rides

This commit is contained in:
Michael Steenbeek authored and GitHub committed 2021-05-13 19:23:53 +02:00
1 parent d22afe2372
commit 513398b1f6
1 file changed
+1 -1
+1 -1
View File
@@ -182,7 +182,7 @@ ride_id_t GetNextFreeRideId()
break;
}
}
if (result >= RIDE_ID_NULL)
if (result >= MAX_RIDES)
{
return RIDE_ID_NULL;
}