check banks overflow
This commit is contained in:
		@@ -1639,6 +1639,11 @@ static void api_load(tic_cartridge* cart, const u8* buffer, s32 size, bool palet
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		buffer += chunk.size;
 | 
							buffer += chunk.size;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// check banks overflow
 | 
				
			||||||
 | 
							for(s32 i = 0; i < sizeof bank / sizeof(s32); i++)
 | 
				
			||||||
 | 
								if(((s32*)&bank)[i] >= TIC_BANKS)
 | 
				
			||||||
 | 
									return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	#undef LOAD_CHUNK
 | 
						#undef LOAD_CHUNK
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user