ref: 10d63425ca7ee205aa986a4aaf34affadaa0434c
parent: 1a9dc27f4ef6b43316cb263ad15c36f3dde35338
author: Simon Howard <fraggle@gmail.com>
date: Sat Sep 20 16:43:56 EDT 2008
Clean up string munging for selecting PCX filename. Subversion-branch: /branches/raven-branch Subversion-revision: 1250
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -481,12 +481,10 @@
// find a file name to save it to
- strcpy(lbmname, "DOOM00.pcx");
-
- for (i=0 ; i<=99 ; i++)
+ for (i=0; i<=99; i++)
{
- lbmname[4] = i / 10 + '0';
- lbmname[5] = i % 10 + '0';
+ sprintf(lbmname, "DOOM%02i.pcx", i);
+
if (!M_FileExists(lbmname))
{
break; // file doesn't exist