portrait_render: make sure to not pass 0 as viewport width/height

That would trip an assertion. May happen with the null renderer (e.g.
replay verification mode), where the fake textures are always 1x1, or
with bad sprite data.
This commit is contained in:
Andrei Alexeyev 2020-06-09 03:18:40 +03:00
parent ae8194ae78
commit 642bdfd2d7
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4

View file

@ -59,8 +59,8 @@ void portrait_render(Sprite *s_base, Sprite *s_face, Sprite *s_out) {
IntRect itc = sprite_denormalized_int_tex_coords(s_base);
uint tex_w = itc.w;
uint tex_h = itc.h;
uint tex_w = imax(itc.w, 1);
uint tex_h = imax(itc.h, 1);
uint spr_w = s_base->extent.w;
uint spr_h = s_base->extent.h;