Fix calloc alloc wrong size

pull/1049/head
Kevin Wang 2019-06-24 14:06:38 +08:00 committed by Alex Medvednikov
parent 35b15b9481
commit 86b71bf2ce
1 changed files with 1 additions and 1 deletions

View File

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