diff --git a/lodepng.cpp b/lodepng.cpp index 2b12fb57..05287bbf 100644 --- a/lodepng.cpp +++ b/lodepng.cpp @@ -398,7 +398,7 @@ unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const FILE* file; file = fopen(filename, "wb" ); if(!file) return 79; - fwrite((char*)buffer , 1 , buffersize, file); + fwrite(buffer, 1, buffersize, file); fclose(file); return 0; }