mirror of
https://github.com/Alcaro/Flips.git
synced 2026-09-07 01:56:07 -05:00
these segfaults aren't necessary
This commit is contained in:
@@ -108,6 +108,8 @@ public:
|
||||
|
||||
static filemap* create(file* f)
|
||||
{
|
||||
if (!f) return NULL;
|
||||
|
||||
size_t len = f->len();
|
||||
uint8_t* ptr = (uint8_t*)malloc(len);
|
||||
if (!ptr) return NULL;
|
||||
@@ -865,7 +867,6 @@ struct errorinfo CreatePatchToMem(LPCWSTR inromname, LPCWSTR outromname, enum pa
|
||||
if (usemmap)
|
||||
{
|
||||
romsmap[i] = filemap::create(romname);
|
||||
lens[i] = romsmap[i]->len();
|
||||
|
||||
if (!romsmap[i])
|
||||
{
|
||||
@@ -876,6 +877,8 @@ struct errorinfo CreatePatchToMem(LPCWSTR inromname, LPCWSTR outromname, enum pa
|
||||
{
|
||||
romsmap[i] = new fileheadermap(romsmap[i]);
|
||||
}
|
||||
|
||||
lens[i] = romsmap[i]->len();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user