// Get file from .ZIP
// Returns the size of the file inside the .ZIP file that we're looking at
//
-uint32 GetFileFromZIP(const char * zipFile, FileType type, uint8 * buffer)
+uint32 GetFileFromZIP(const char * zipFile, FileType type, uint8 * &buffer)
{
#warning "!!! FIX !!! Should have sanity checking for ROM size to prevent buffer overflow!"
const char ftStrings[5][32] = { "Software", "EEPROM", "Label", "Box Art", "Controller Overlay" };
if (found)
{
WriteLog("FILE: Uncompressing...");
+ buffer = new uint8[ze->uncompressed_size];
if (readuncompresszip(zip, ze, (char *)buffer) == 0)
{
else
{
WriteLog("FAILED!\n");
+ delete[] buffer;
return 0;
}
}