mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net: fix byte buffers
This commit is contained in:
@ -57,7 +57,7 @@ pub fn (mut con TcpConn) read_line_max(max_line_len int) string {
|
||||
if !con.is_blocking {
|
||||
con.set_blocking(true) or {}
|
||||
}
|
||||
mut buf := [net.max_read]byte{} // where C.recv will store the network data
|
||||
mut buf := [net.max_read]u8{} // where C.recv will store the network data
|
||||
mut res := strings.new_builder(net.max_read) // The final result, including the ending \n.
|
||||
defer {
|
||||
unsafe { res.free() }
|
||||
|
Reference in New Issue
Block a user