nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa0cef4
)
lib/socket: fix `NativeSocket::write_byte`
author
Alexis Laferrière
<alexis.laf@xymus.net>
Sun, 24 May 2015 17:26:46 +0000
(13:26 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Mon, 25 May 2015 15:57:27 +0000
(11:57 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/socket/socket_c.nit
patch
|
blob
|
history
diff --git
a/lib/socket/socket_c.nit
b/lib/socket/socket_c.nit
index
a574485
..
518fcb5
100644
(file)
--- 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 `{