From 401588f3a5b3c30ae1adada38e3b2b6d3c2df1b6 Mon Sep 17 00:00:00 2001 From: Hugo Hromic Date: Sat, 23 Feb 2019 10:20:28 +0000 Subject: [PATCH] (cheevos.c) silence warnings * Enlarge arrays to acommodate all potential data * Use co-routine field in for-loop --- cheevos-new/cheevos.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cheevos-new/cheevos.c b/cheevos-new/cheevos.c index c847cf7e78..435a154f08 100644 --- a/cheevos-new/cheevos.c +++ b/cheevos-new/cheevos.c @@ -505,7 +505,7 @@ static void cheevos_award(cheevos_cheevo_t* cheevo, int mode) /* Take a screenshot of the achievement. */ if (settings && settings->bools.cheevos_auto_screenshot) { - char shotname[256]; + char shotname[8192]; snprintf(shotname, sizeof(shotname), "%s/%s-cheevo-%u", settings->paths.directory_screenshot, @@ -1807,7 +1807,7 @@ found: if (ret != 0) { - char msg[256]; + char msg[512]; snprintf(msg, sizeof(msg), "RetroAchievements: %s", tok); @@ -1943,12 +1943,12 @@ found: CORO_GOSUB(LOGIN); { - int i, ret; + int ret; unsigned mode; - for (i = 0; i < 2; i++) + for (coro->i = 0; coro->i < 2; coro->i++) { - ret = rc_url_get_unlock_list(coro->url, sizeof(coro->url), coro->settings->arrays.cheevos_username, cheevos_locals.token, coro->gameid, i); + ret = rc_url_get_unlock_list(coro->url, sizeof(coro->url), coro->settings->arrays.cheevos_username, cheevos_locals.token, coro->gameid, coro->i); if (ret < 0) { @@ -1961,7 +1961,7 @@ found: if (coro->json) { - mode = i == 0 ? CHEEVOS_ACTIVE_SOFTCORE : CHEEVOS_ACTIVE_HARDCORE; + mode = coro->i == 0 ? CHEEVOS_ACTIVE_SOFTCORE : CHEEVOS_ACTIVE_HARDCORE; cheevos_deactivate_unlocks(coro->json, cheevos_unlock_cb, &mode); CHEEVOS_FREE(coro->json); }