ref: 6d3ff523db105172e47eefed7b768decd2978945
parent: 543e510da1869cf8d352225bade8fc732c598497
author: cinap_lenrek <[email protected]>
date: Fri Jul 27 12:49:56 EDT 2012
doom: fix -warp argument parsing bug
--- a/sys/src/games/doom/d_main.c
+++ b/sys/src/games/doom/d_main.c
@@ -917,13 +917,11 @@
p = M_CheckParm ("-warp");
if (p && p < myargc-1)
{
- if (gamemode == commercial)
- startmap = atoi (myargv[p+1]);
- else
- {
- startepisode = myargv[p+1][0]-'0';
- startmap = myargv[p+2][0]-'0';
- }
+ startmap = atoi (myargv[p+1]);
+ if (gamemode != commercial){
+ startepisode = startmap / 10;
+ startmap %= 10;
+ }
autostart = true;
}