Skip to content

Commit

Permalink
Fix dubious condition checks (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
skejeton committed Apr 14, 2024
1 parent 6d9d489 commit 38e70b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,12 @@ void
umth_image_get_dims(UmkaStackSlot *p, UmkaStackSlot *r)
{
th_image *img = p[0].ptrVal;
if (!img)
return;
th_vf2 *out = (th_vf2 *)p[1].ptrVal;

if (!img)
return;

th_vf2 *out = (th_vf2 *)p[1].ptrVal;

*out = img->dm;
}

Expand Down
2 changes: 1 addition & 1 deletion src/collisions.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ th_quad_to_quad(th_quad *q1, th_quad *q2, th_vf2 *ic)
{
th_rect r1 = th_quad_bounding_box(*q1);
th_rect r2 = th_quad_bounding_box(*q2);
if (!th_rect_to_rect(&r1, &r2) && !th_rect_to_rect(&r1, &r2))
if (!th_rect_to_rect(&r1, &r2))
return 0;

for (uu i = 0; i < 4; i++)
Expand Down

0 comments on commit 38e70b5

Please sign in to comment.