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:
parent
35b15b9481
commit
86b71bf2ce
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user