Skip to content

Commit f2f4edd

Browse files
committed
fix bug in uv_ll tests uncovered by not zeroing
1 parent 7103ca9 commit f2f4edd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/uv_ll.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ pub mod test {
12531253
as *request_wrapper;
12541254
let buf_base = get_base_from_buf(buf);
12551255
let buf_len = get_len_from_buf(buf);
1256-
let bytes = vec::from_buf(buf_base, buf_len as uint);
1256+
let bytes = vec::from_buf(buf_base, nread as uint);
12571257
let read_chan = (*client_data).read_chan.clone();
12581258
let msg_from_server = str::from_bytes(bytes);
12591259
read_chan.send(msg_from_server);
@@ -1445,15 +1445,15 @@ pub mod test {
14451445
buf_base as uint,
14461446
buf_len as uint,
14471447
nread));
1448-
let bytes = vec::from_buf(buf_base, buf_len);
1448+
let bytes = vec::from_buf(buf_base, nread as uint);
14491449
let request_str = str::from_bytes(bytes);
14501450

14511451
let client_data = get_data_for_uv_handle(
14521452
client_stream_ptr as *libc::c_void) as *tcp_server_data;
14531453

14541454
let server_kill_msg = (*client_data).server_kill_msg;
14551455
let write_req = (*client_data).server_write_req;
1456-
if (str::contains(request_str, server_kill_msg)) {
1456+
if str::contains(request_str, server_kill_msg) {
14571457
log(debug, ~"SERVER: client req contains kill_msg!");
14581458
log(debug, ~"SERVER: sending response to client");
14591459
read_stop(client_stream_ptr);

0 commit comments

Comments
 (0)