mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Fix crash when plugin has missing text section (#6264)
This commit is contained in:
		
							parent
							
								
									84e54a52a6
								
							
						
					
					
						commit
						0f6478a928
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -26,7 +26,8 @@ | |||
| #include "core/loader/loader.h" | ||||
| 
 | ||||
| static std::string ReadTextInfo(FileUtil::IOFile& file, std::size_t offset, std::size_t max_size) { | ||||
|     if (max_size > 0x400) { // Limit read string size to 0x400 bytes, just in case
 | ||||
|     if (offset == 0 || max_size == 0 || | ||||
|         max_size > 0x400) { // Limit read string size to 0x400 bytes, just in case
 | ||||
|         return ""; | ||||
|     } | ||||
|     std::vector<char> char_data(max_size); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue