View Single Post
Old 10 December 2017, 10:10   #4
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by roondar View Post
However, my compiled-under-windows version of diskimage.c (from the Solid Gold Source) does very odd stuff.
I suppose it uses fopen(filename,"w"). This means that the contents is treated as text and on a DOS/Windows machine each newline character ($0a) gets a carriage return ($0d) added to it.

Change this to fopen(filename,"wb"), then the contents will be treated as binary and written as is.

The same is true for "r", then every $0d before a $0a will be filtered out. Change this to "rb", too.
thomas is offline  
 
Page generated in 0.06385 seconds with 11 queries