mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: fix eating .zlib in $embed_file('v.png', .zlib)
(#12794)
This commit is contained in:
@ -1700,7 +1700,11 @@ pub fn (mut f Fmt) comptime_call(node ast.ComptimeCall) {
|
||||
}
|
||||
} else {
|
||||
if node.is_embed {
|
||||
if node.embed_file.compression_type == 'none' {
|
||||
f.write("\$embed_file('$node.embed_file.rpath')")
|
||||
} else {
|
||||
f.write("\$embed_file('$node.embed_file.rpath', .$node.embed_file.compression_type)")
|
||||
}
|
||||
} else if node.is_env {
|
||||
f.write("\$env('$node.args_var')")
|
||||
} else if node.is_pkgconfig {
|
||||
|
@ -5,4 +5,5 @@ fn main() {
|
||||
eprintln('content: ${ptr_str(content)}')
|
||||
eprintln(unsafe { the_png.data().vbytes(the_png.len) }.hex())
|
||||
println(the_png)
|
||||
the_other_png := $embed_file('v.png', .zlib)
|
||||
}
|
||||
|
Reference in New Issue
Block a user