mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 05:30:05 +00:00
Fix crash when plugin has missing text section (#6264)
This commit is contained in:
parent
84e54a52a6
commit
0f6478a928
@ -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…
Reference in New Issue
Block a user