From d0cf3b75551561b173743db02c9393ed11a6a065 Mon Sep 17 00:00:00 2001 From: meyraud705 Date: Tue, 20 Apr 2021 18:26:02 +0200 Subject: [PATCH] Return correct button id --- src/video/wayland/SDL_waylandmessagebox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandmessagebox.c b/src/video/wayland/SDL_waylandmessagebox.c index f42414531..d944833b3 100644 --- a/src/video/wayland/SDL_waylandmessagebox.c +++ b/src/video/wayland/SDL_waylandmessagebox.c @@ -167,7 +167,7 @@ Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid) for (i = 0; i < messageboxdata->numbuttons; i += 1) { if (messageboxdata->buttons[i].text != NULL) { if (SDL_strcmp(output, messageboxdata->buttons[i].text) == 0) { - *buttonid = i; + *buttonid = messageboxdata->buttons[i].buttonid; break; } }