Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
doxygen committed Jun 22, 2019
1 parent 3360831 commit 15678e7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions liblodepng/lodepng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2434,12 +2434,7 @@ void LodePNG_Encoder_copy(LodePNG_Encoder* dest, const LodePNG_Encoder* source)
/*write given buffer to the file, overwriting the file, it doesn't append to it.*/
unsigned LodePNG_saveFile(const unsigned char* buffer, size_t buffersize, const char* filename)
{
FILE* file;
#if defined(_WIN32) && !defined(__CYGWIN__)
file = _fopen(filename,"wb");
#else
file = fopen(filename,"wb");
#endif
FILE* file = fopen(filename,"wb");
if(!file) return 79;
fwrite((char*)buffer , 1 , buffersize, file);
fclose(file);
Expand Down

0 comments on commit 15678e7

Please sign in to comment.