Commit 0994a75879544960b285ba49448701ca00a35486

Ivan Epifanov 2021-07-01T20:36:49

Don't hardcode message length

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/vita/SDL_vitamessagebox.c b/src/video/vita/SDL_vitamessagebox.c
index 09c8ae1..a3969d7 100644
--- a/src/video/vita/SDL_vitamessagebox.c
+++ b/src/video/vita/SDL_vitamessagebox.c
@@ -53,7 +53,7 @@ int VITA_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
     param.mode = SCE_MSG_DIALOG_MODE_USER_MSG;
 
     SDL_zero(msgParam);
-    SDL_snprintf(message, 512, "%s\r\n\r\n%s", messageboxdata->title, messageboxdata->message);
+    SDL_snprintf(message, sizeof(message), "%s\r\n\r\n%s", messageboxdata->title, messageboxdata->message);
 
     msgParam.msg = (const SceChar8*)message;
     SDL_zero(buttonParam);