Closed AvdN closed 5 years ago
If msg_size(m) equals 0 you cannot take the address of result[0] leading to an IndexError.
msg_size(m)
0
result[0]
result = newString( msg_size(m) ) copyMem(addr(result[0]), msg_data(m), result.len)
One should only do the copyMem if there are actual bytes to be copied.
copyMem
If
msg_size(m)
equals0
you cannot take the address ofresult[0]
leading to an IndexError.One should only do the
copyMem
if there are actual bytes to be copied.