mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
compiler: cast correctly strings between byte* and char* when needed
This commit is contained in:
parent
0a0d6536c2
commit
ad32a3770b
4 changed files with 10 additions and 10 deletions
|
@ -608,7 +608,7 @@ fn type_default(typ string) string {
|
|||
// Default values for other types are not needed because of mandatory initialization
|
||||
switch typ {
|
||||
case 'bool': return '0'
|
||||
case 'string': return 'tos("", 0)'
|
||||
case 'string': return 'tos((byte *)"", 0)'
|
||||
case 'i8': return '0'
|
||||
case 'i16': return '0'
|
||||
case 'i32': return '0'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue