From 3095861199f4efc2aae84707c033902fec87830b Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 22 Apr 2009 13:59:28 +0200 Subject: [PATCH] bug fix: recving raw data was incorrect. --- src/net.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net.cc b/src/net.cc index bb10537c1d..16885ef0b3 100644 --- a/src/net.cc +++ b/src/net.cc @@ -442,7 +442,7 @@ Socket::Write (const Arguments& args) oi_buf *buf = oi_buf_new2(length); for (int i = 0; i < length; i++) { Local int_value = array->Get(Integer::New(i)); - buf->base[i] = int_value->Int32Value(); + buf->base[i] = int_value->IntegerValue(); } oi_socket_write(&socket->socket_, buf); @@ -499,7 +499,7 @@ Socket::OnRead (oi_socket *s, const void *buf, size_t count) // raw encoding Local array = Array::New(count); for (int i = 0; i < count; i++) { - int val = static_cast(buf)[i]; + char val = static_cast(buf)[i]; array->Set(Integer::New(i), Integer::New(val)); } argv[0] = array;