aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com>2020-07-22 16:39:24 +0100
committerGitHub <noreply@github.com>2020-07-22 16:39:24 +0100
commit7937406af6c9825bed23f9947f9c0e05d3c4b71e (patch)
tree423184dcd6c545943f7f592aed5f4478b97a87e2
parent7fb67570e9422b615bbba7f1243b3e0b4bf849e4 (diff)
Change binary stream to u8 and cast to char*
-rw-r--r--src/frontend/qt_sdl/main.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}