libweston: fix output clamp helper

Any coordinate that didn't change during clamping was left uninitialized,
resulting in failures later.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2023-10-06 09:53:35 -05:00 committed by Marius Vlad
parent 209b7eb56a
commit e49294b901
1 changed files with 1 additions and 1 deletions

View File

@ -905,7 +905,7 @@ WL_EXPORT struct weston_coord_global
weston_coord_global_clamp_for_output(struct weston_coord_global pos,
const struct weston_output *output)
{
struct weston_coord_global clamped_pos;
struct weston_coord_global clamped_pos = pos;
double quantum = 1.0 / 1024.0;
int x = pos.c.x;
int y = pos.c.y;