Skip to content

Instantly share code, notes, and snippets.

@jrsa
Created November 3, 2014 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrsa/5db0f7d6f5c02f25255b to your computer and use it in GitHub Desktop.
Save jrsa/5db0f7d6f5c02f25255b to your computer and use it in GitHub Desktop.
diff -r edf0303cbcb5 src/noggit/mpq/archive.cpp
--- a/src/noggit/mpq/archive.cpp Tue Jan 17 23:22:44 2012 +0100
+++ b/src/noggit/mpq/archive.cpp Sun Nov 02 16:35:29 2014 -0800
@@ -51,10 +51,10 @@
if (SFileOpenFileEx (_archive_handle, "(listfile)", 0, &file_handle))
{
- const size_t filesize (SFileGetFileSize (file_handle));
+ const size_t filesize (SFileGetFileSize (file_handle, 0));
char* readbuffer (new char[filesize]);
- SFileReadFile (file_handle, readbuffer, filesize);
+ SFileReadFile (file_handle, readbuffer, filesize, 0, 0);
SFileCloseFile (file_handle);
app().archive_manager().add_to_listfile
@@ -98,10 +98,10 @@
);
if (opened)
{
- *size = SFileGetFileSize (file_handle);
+ *size = SFileGetFileSize (file_handle, 0);
*buffer = new char[*size];
- SFileReadFile (file_handle, *buffer, *size);
+ SFileReadFile (file_handle, *buffer, *size, 0, 0);
SFileCloseFile (file_handle);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment