Fix fwrite

This commit is contained in:
pjht 2019-04-09 18:12:54 -05:00
parent 1c832e8f7a
commit 97f18478ed

View File

@ -231,7 +231,7 @@ size_t fwrite(void* buffer_ptr,size_t size,size_t count,FILE* stream) {
char* buffer=(char*)buffer_ptr;
size_t bytes=size*count;
for (size_t i=0;i<bytes;i++) {
int c=fputs(stream,buffer[i]);
int c=fputc(buffer[i],stream);
if (c==EOF) {
return (size_t)(i/size);
}