cgen: fix $embed_file not finding embedded file when using -prod (#12596)
parent
1d8ece7ac0
commit
f72d001db5
|
@ -61,7 +61,7 @@ fn (mut g Gen) gen_embedded_data() {
|
|||
g.embedded_data.writeln('')
|
||||
g.embedded_data.writeln('const v__embed_file__EmbedFileIndexEntry _v_embed_file_index[] = {')
|
||||
for i, emfile in g.embedded_files {
|
||||
g.embedded_data.writeln('\t{$i, { .str=(byteptr)("${cestring(emfile.rpath)}"), .len=${emfile.rpath.len - 1}, .is_lit=1 }, _v_embed_blob_$i},')
|
||||
g.embedded_data.writeln('\t{$i, { .str=(byteptr)("${cestring(emfile.rpath)}"), .len=$emfile.rpath.len, .is_lit=1 }, _v_embed_blob_$i},')
|
||||
}
|
||||
g.embedded_data.writeln('\t{-1, { .str=(byteptr)(""), .len=0, .is_lit=1 }, NULL}')
|
||||
g.embedded_data.writeln('};')
|
||||
|
|
|
@ -5,7 +5,7 @@ static const unsigned char _v_embed_blob_0[138] = {
|
|||
0x66,0x6e,0x20,0x6d,0x61,0x69,0x6e,0x28,0x29,0x20,0x7b,0x0a,0x09,0x6d,0x75,0x74,
|
||||
|
||||
const v__embed_file__EmbedFileIndexEntry _v_embed_file_index[] = {
|
||||
{0, { .str=(byteptr)("embed.vv"), .len=7, .is_lit=1 }, _v_embed_blob_0},
|
||||
{0, { .str=(byteptr)("embed.vv"), .len=8, .is_lit=1 }, _v_embed_blob_0},
|
||||
{-1, { .str=(byteptr)(""), .len=0, .is_lit=1 }, NULL}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue