diff --git a/CMakeLists.txt b/CMakeLists.txt index b293edc..2b461a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,8 @@ endif (UNIX) if (WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) -set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -MTd") -set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -MT") +set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -MTd -EHsc") +set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -MT -EHsc") endif (WIN32) include_directories("minilzo-2.09" "json11") diff --git a/xcomreader.cpp b/xcomreader.cpp index c74d28e..e2f74c8 100644 --- a/xcomreader.cpp +++ b/xcomreader.cpp @@ -692,10 +692,11 @@ namespace xcom xcom_io rdr{ std::move(b) }; save.hdr = read_header(rdr); buffer uncompressed_buf = decompress(rdr); - +#ifdef _DEBUG FILE *fp = fopen("output.dat", "wb"); fwrite(uncompressed_buf.buf.get(), 1, uncompressed_buf.length, fp); fclose(fp); +#endif xcom_io uncompressed(std::move(uncompressed_buf)); save.actors = read_actor_table(uncompressed); save.checkpoints = read_checkpoint_chunk_table(uncompressed);