From 5a49f8233163e0a5cfe4524b02e6a08eb4d2d66d Mon Sep 17 00:00:00 2001 From: marqdevx Date: Tue, 17 Oct 2023 16:23:26 +0200 Subject: [PATCH] Fix restore file naming --- src/adminsystem.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/adminsystem.cpp b/src/adminsystem.cpp index dd4b99be..f3b1791d 100644 --- a/src/adminsystem.cpp +++ b/src/adminsystem.cpp @@ -176,11 +176,9 @@ CON_COMMAND_CHAT(restore, "Restore round") int nRounds = atoi(args[1]); - V_snprintf(aux, MAX_PATH, "%s", backupFile); + V_snprintf(buf, MAX_PATH, "%s", backupFile); - if ( nRounds < 10) V_snprintf(buf, MAX_PATH, "%s%i",aux, 0); - - V_snprintf(aux, MAX_PATH, "%s%i.txt", buf, nRounds); + V_snprintf(aux, MAX_PATH, "%s%02i.txt", buf, nRounds); V_snprintf(buf, MAX_PATH, "mp_backup_restore_load_file %s", aux);