]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix a bug with WriteFile
authorMackenzie Straight <eizneckam@gmail.com>
Mon, 13 Dec 2004 23:00:07 +0000 (23:00 +0000)
committerMackenzie Straight <eizneckam@gmail.com>
Mon, 13 Dec 2004 23:00:07 +0000 (23:00 +0000)
native/win32/write.c

index 9b3e66bb101b694da870580caa35f2c11ed15fa5..9f546ee69fed6ea6d1303dcb31f7a504c5a53873 100644 (file)
@@ -16,13 +16,15 @@ void primitive_can_write (void)
 
 void write_char_8 (F_PORT *port, F_FIXNUM ch)
 {
-       char buf = (char)ch;
-       WriteFile((HANDLE)port->fd, &buf, 1, NULL, NULL); 
+       DWORD ignore;
+       BYTE buf = (BYTE)ch;
+       WriteFile((HANDLE)port->fd, &buf, 1, &ignore, NULL);
 }
 
 void write_string_8 (F_PORT *port, F_STRING *str)
 {
-       WriteFile((HANDLE)port->fd, to_c_string(str), str->capacity, NULL, NULL);
+       DWORD ignore;
+       WriteFile((HANDLE)port->fd, to_c_string_unchecked(str), str->capacity, &ignore, NULL);
 }
 
 void primitive_write_8 (void)