mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
checker: do not allow &u8(0), force nil like we do with &Type(0)
This commit is contained in:
parent
3ab660b4c6
commit
7d57a19d7e
52 changed files with 184 additions and 118 deletions
|
@ -205,7 +205,7 @@ pub fn (mut zentry Zip) create_entry(name string) ! {
|
|||
// NOTE: remember to release the memory allocated for an output buffer.
|
||||
// for large entries, please take a look at zip_entry_extract function.
|
||||
pub fn (mut zentry Zip) read_entry() !voidptr {
|
||||
mut buf := &u8(0)
|
||||
mut buf := &u8(unsafe { nil })
|
||||
mut bsize := usize(0)
|
||||
res := C.zip_entry_read(zentry, unsafe { &voidptr(&buf) }, &bsize)
|
||||
if res == -1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue