diff options
author | Simon Howard | 2008-09-20 20:43:56 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-20 20:43:56 +0000 |
commit | 10d63425ca7ee205aa986a4aaf34affadaa0434c (patch) | |
tree | da29df48bcdc3a220af848ebef071ded272b93ad /src | |
parent | 1a9dc27f4ef6b43316cb263ad15c36f3dde35338 (diff) | |
download | chocolate-doom-10d63425ca7ee205aa986a4aaf34affadaa0434c.tar.gz chocolate-doom-10d63425ca7ee205aa986a4aaf34affadaa0434c.tar.bz2 chocolate-doom-10d63425ca7ee205aa986a4aaf34affadaa0434c.zip |
Clean up string munging for selecting PCX filename.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1250
Diffstat (limited to 'src')
-rw-r--r-- | src/v_video.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/v_video.c b/src/v_video.c index b9ca1645..5bb9e077 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -481,12 +481,10 @@ void V_ScreenShot (void) // 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 |