Changeset - r25976:4cb7d4539ceb
[Not reviewed]
master
0 1 0
PeterN - 3 years ago 2021-09-19 20:52:08
peter1138@openttd.org
Fix #9562: Handle case of invalid action2 with zero results. (#9564)
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -5168,6 +5168,11 @@ static void NewSpriteGroup(ByteReader *b
 
					grfmsg(6, "NewSpriteGroup: New SpriteGroup 0x%02X, %u loaded, %u loading",
 
							setid, num_loaded, num_loading);
 

	
 
					if (num_loaded + num_loading == 0) {
 
						grfmsg(1, "NewSpriteGroup: no result, skipping invalid RealSpriteGroup");
 
						break;
 
					}
 

	
 
					if (num_loaded + num_loading == 1) {
 
						/* Avoid creating 'Real' sprite group if only one option. */
 
						uint16 spriteid = buf->ReadWord();
0 comments (0 inline, 0 general)