Return correct button id

This commit is contained in:
meyraud705 2021-04-20 18:26:02 +02:00 committed by Ryan C. Gordon
parent 1fd95c53b6
commit d0cf3b7555
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ Wayland_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
for (i = 0; i < messageboxdata->numbuttons; i += 1) { for (i = 0; i < messageboxdata->numbuttons; i += 1) {
if (messageboxdata->buttons[i].text != NULL) { if (messageboxdata->buttons[i].text != NULL) {
if (SDL_strcmp(output, messageboxdata->buttons[i].text) == 0) { if (SDL_strcmp(output, messageboxdata->buttons[i].text) == 0) {
*buttonid = i; *buttonid = messageboxdata->buttons[i].buttonid;
break; break;
} }
} }