1
0
mirror of synced 2025-01-29 19:17:28 +01:00

Fixed handle leak when loading pattern file

Thanks @HookedBehemoth
This commit is contained in:
WerWolv 2020-11-13 12:07:30 +01:00
parent 0dcf02f891
commit 295b32b890

View File

@ -62,8 +62,10 @@ namespace hex {
size_t size = ftell(file);
rewind(file);
if (size > 0xFF'FFFF)
if (size > 0xFF'FFFF) {
fclose(file);
return;
}
fread(this->m_buffer, size, 1, file);