1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: cast correctly strings between byte* and char* when needed

This commit is contained in:
Henrixounez
2019-08-25 00:12:11 +02:00
committed by Alexander Medvednikov
parent 0a0d6536c2
commit ad32a3770b
4 changed files with 10 additions and 10 deletions

View File

@ -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'