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;