29 Jun
2023
29 Jun
'23
9:14 a.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
- list_move_tail(&body_block.instrs, iter); + list_move_tail(&body->instrs, iter);
if (type == LOOP_DO_WHILE) - list_move_tail(&body_block.instrs, cond); + list_move_tail(&body->instrs, cond); + else + list_move_head(&body->instrs, cond);
- if (!(loop = hlsl_new_loop(ctx, &body_block, loc))) + if (!(loop = hlsl_new_loop(ctx, body, loc))) goto oom; list_add_tail(init, &loop->entry);
vkd3d_free(cond); vkd3d_free(body); `destroy_block()` here too.
Also, shouldn't you free `iter` too? -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/258#note_37281