From d9f9be2549a1726d3d346917bb956b8ebaed3d72 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Mon, 8 Jun 2015 14:41:53 +0200 Subject: fix hanging when the demo file is not found --- src/client/cl_main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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; -- cgit