mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix warnings (#5820)
This commit is contained in:
@ -149,7 +149,7 @@ pub fn (s string) cstr() byteptr {
|
||||
|
||||
// cstring_to_vstring creates a copy of cstr and turns it into a v string
|
||||
pub fn cstring_to_vstring(cstr byteptr) string {
|
||||
slen := C.strlen(cstr)
|
||||
slen := C.strlen(charptr(cstr))
|
||||
mut s := byteptr(memdup(cstr, slen + 1))
|
||||
s[slen] = `\0`
|
||||
return tos(s, slen)
|
||||
|
Reference in New Issue
Block a user