diff options
author | /dev/humancontroller <devhc@example.com> | 2015-06-08 14:41:53 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:06 +0100 |
commit | d9f9be2549a1726d3d346917bb956b8ebaed3d72 (patch) | |
tree | bf002eb5fc0b16161776e1554d9d70bf7348644a /src/client/cl_main.c | |
parent | b6ca2a49ec7b7d700e0b4a3754d141cdcb3fd2c2 (diff) |
fix hanging when the demo file is not found
Diffstat (limited to 'src/client/cl_main.c')
-rw-r--r-- | src/client/cl_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c index 97d15077..5d91da92 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -974,7 +974,7 @@ CL_WalkDemoExt */ static int CL_WalkDemoExt(char *arg, char *name, int *demofile) { - int i = 0; + int i; *demofile = 0; Com_sprintf (name, MAX_OSPATH, "demos/%s.%s%d", arg, DEMOEXT, PROTOCOL_VERSION); @@ -988,7 +988,7 @@ static int CL_WalkDemoExt(char *arg, char *name, int *demofile) Com_Printf("Not found: %s\n", name); - while(demo_protocols[i]) + for(i = 0; demo_protocols[i]; ++i) { if(demo_protocols[i] == PROTOCOL_VERSION) continue; @@ -1003,7 +1003,6 @@ static int CL_WalkDemoExt(char *arg, char *name, int *demofile) } else Com_Printf("Not found: %s\n", name); - i++; } return -1; |