1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Fix calloc alloc wrong size

This commit is contained in:
Kevin Wang 2019-06-24 14:06:38 +08:00 committed by Alex Medvednikov
parent 35b15b9481
commit 86b71bf2ce

View File

@ -84,7 +84,7 @@ pub fn calloc(n int) byteptr {
if n < 0 {
panic('calloc(<0)')
}
return C.calloc(sizeof(float) * n, sizeof(float))
return C.calloc(n, 1)
}
fn _strlen(s byteptr) int {