From 7937406af6c9825bed23f9947f9c0e05d3c4b71e Mon Sep 17 00:00:00 2001 From: WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> Date: Wed, 22 Jul 2020 16:39:24 +0100 Subject: Change binary stream to u8 and cast to char* --- src/frontend/qt_sdl/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index 75317f8..f77c287 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -1413,7 +1413,7 @@ std::string extractROM(char* zipName, std::string zipDir){ zip_stat_index(z, 0, 0, &st); //Get information about the file at index 0 //Allocate memory for its uncompressed contents - char *contents = new char[st.size]; + u8 *contents = new u8[st.size]; //Read the compressed file zip_file *f = zip_fopen_index(z, 0, 0); //Open file at index 0 @@ -1423,7 +1423,7 @@ std::string extractROM(char* zipName, std::string zipDir){ zip_close(z); //Write the file (binary mode) - std::ofstream(zipDir + "/" + st.name, std::ofstream::binary).write(contents, st.size); + std::ofstream(zipDir + "/" + st.name, std::ofstream::binary).write((char*) contents, st.size); delete[] contents; return zipDir + "/" + st.name; } -- cgit v1.2.3