This commit is contained in:
2021-10-29 00:24:12 +02:00
parent 0c5c680f62
commit ee7be81434
3 changed files with 9 additions and 12 deletions

View File

@@ -1315,7 +1315,7 @@ point_to_line_segment_distance
/* The projection is beyond the line segment. */
if (u < 0.)
return ld_point_distance (point, p1->x, p1->y);
else if (u > 1.)
if (u > 1.)
return ld_point_distance (point, p2->x, p2->y);
/* The projection is on the line segment. */

View File

@@ -250,8 +250,7 @@ ld_lua_alloc (void *ud, void *ptr, size_t osize, size_t nsize)
g_free (ptr);
return NULL;
}
else
return g_try_realloc (ptr, nsize);
return g_try_realloc (ptr, nsize);
}
/**