read -pilot arg with and without filename extension

This commit is contained in:
zicodxx 2007-05-10 09:34:27 +00:00
parent ecf8a53e0c
commit 5bf5153f5b
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20070510
--------
main/inferno.c: read -pilot arg with and without filename extension
20070509
--------
arch/ogl/gr.c, arch/sdl/gr.c, main/game.c, main/newmenu.c: update viewing values at Fullscreen Toggle; added Fullscreen Toggle to Menus and Demo Playback

View file

@ -629,6 +629,8 @@ int main(int argc,char **argv)
}
}
strlwr(filename);
if(!strstr(filename,".plr")) // if player hasn't specified .plr extension in argument, add it
strcat(filename,".plr");
if(!access(filename,4))
{
strcpy(strstr(filename,".plr"),"\0");