mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: avoid a compiler warning in generated code (#15394)
This commit is contained in:
parent
1c6366eb9c
commit
5095364838
@ -987,7 +987,7 @@ fn (g Gen) optional_type_text(styp string, base string) string {
|
||||
ret := 'struct $styp {
|
||||
byte state;
|
||||
IError err;
|
||||
byte data[sizeof($size) > 0 ? sizeof($size) : 1];
|
||||
byte data[sizeof($size) > 1 ? sizeof($size) : 1];
|
||||
}'
|
||||
return ret
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user