From: Alexis Laferrière Date: Sun, 24 May 2015 17:26:46 +0000 (-0400) Subject: lib/socket: fix `NativeSocket::write_byte` X-Git-Tag: v0.7.5~28^2~2 X-Git-Url: http://nitlanguage.org lib/socket: fix `NativeSocket::write_byte` Signed-off-by: Alexis Laferrière --- diff --git a/lib/socket/socket_c.nit b/lib/socket/socket_c.nit index a574485..518fcb5 100644 --- a/lib/socket/socket_c.nit +++ b/lib/socket/socket_c.nit @@ -134,7 +134,8 @@ extern class NativeSocket `{ int* `} # Write `value` as a single byte fun write_byte(value: Int): Int `{ - return write(*recv, &value, 1); + unsigned char byt = (unsigned char)value; + return write(*recv, &byt, 1); `} fun read: String import NativeString.to_s_with_length `{