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

cgen: avoid another sizeof warning in generated code (#15435)

This commit is contained in:
Markus F.X.J. Oberhumer 2022-08-16 19:20:13 +02:00 committed by GitHub
parent 18cccb6caf
commit 77fd1419a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1004,7 +1004,7 @@ fn (g Gen) result_type_text(styp string, base string) string {
ret := 'struct $styp {
bool is_error;
IError err;
byte data[sizeof($size) > 0 ? sizeof($size) : 1];
byte data[sizeof($size) > 1 ? sizeof($size) : 1];
}'
return ret
}