diff --git a/Makefile b/Makefile index 23bf94f..3305ae3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ CXX = g++ CXXFLAGS = -Wall -Wextra -Wpedantic -Wshadow +ifeq ($(OS),Windows_NT) + CXXFLAGS += -static +endif OUTPUT = range_randomizer all: main diff --git a/romprocessor.cpp b/romprocessor.cpp index 8477596..027c2cf 100644 --- a/romprocessor.cpp +++ b/romprocessor.cpp @@ -3,8 +3,8 @@ using namespace std; RomProcessor::RomProcessor(const char *in_path, const char *out_path) { - rom_file.open(in_path); - out_file.open(out_path, fstream::in | fstream::out | fstream::trunc); + rom_file.open(in_path, fstream::in | fstream::binary); + out_file.open(out_path, fstream::in | fstream::out | fstream::trunc | fstream::binary); out_file << rom_file.rdbuf(); out_file.flush(); // copy over file