diff --git a/qw/source/sv_pr_cmds.c b/qw/source/sv_pr_cmds.c index b6c88c20d..4f832e5a2 100644 --- a/qw/source/sv_pr_cmds.c +++ b/qw/source/sv_pr_cmds.c @@ -743,7 +743,7 @@ do_precache (progs_t *pr, const char **cache, int max, const char *name, } s[i] = 0; - for (i = 0; i < MAX_SOUNDS; i++) { + for (i = 0; i < max; i++) { if (!cache[i]) { char *c = Hunk_Alloc (strlen (s) + 1); strcpy (c, s);