From c6b6c7926f5d893084fa5ced701ccecf11ec89a0 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Fri, 6 Jun 2003 12:35:52 +0000 Subject: [PATCH] Fix one bug, but doesn't fix all screenshots being saved to qf0000.tga... --- libs/util/quakefs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 1893df934..c58273567 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -1265,12 +1265,12 @@ QFS_NextFilename (dstring_t *filename, const char *prefix, const char *ext) dsprintf (filename, "%s0000%s", prefix, ext); digits = filename->str + strlen (prefix); - + for (i = 0; i <= 9999; i++) { digits[0] = i / 1000 + '0'; digits[1] = i / 100 % 10 + '0'; - digits[1] = i / 10 % 10 + '0'; - digits[2] = i % 10 + '0'; + digits[2] = i / 10 % 10 + '0'; + digits[3] = i % 10 + '0'; if (Sys_FileTime (va ("%s/%s/%s", qfs_userpath, qfs_gamedir->dir.def, filename->str)) == -1) return 1; // file doesn't exist