From cbc8976e46ce9a72bafc9914c82cf1513bb9ac0c Mon Sep 17 00:00:00 2001 From: Mackenzie Straight Date: Mon, 13 Dec 2004 23:00:07 +0000 Subject: [PATCH] Fix a bug with WriteFile --- native/win32/write.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/native/win32/write.c b/native/win32/write.c index 9b3e66bb10..9f546ee69f 100644 --- a/native/win32/write.c +++ b/native/win32/write.c @@ -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)