From 6873e64cf56152d56902a06841b56a5f33d3026d Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Tue, 17 Oct 2006 11:56:31 +0000 Subject: [PATCH] symset restrictions (trunk only) The restricted bits could end up set on non-restricted sets. This case needs to check that we're in a matching set. --- src/files.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/files.c b/src/files.c index 092f14381..6dedcfed7 100644 --- a/src/files.c +++ b/src/files.c @@ -2625,9 +2625,10 @@ int which_set; } break; case 5: /* restrictions: xxxx*/ - i = 0; - while (known_restrictions[i]) { - if (!strcmpi(known_restrictions[i], bufp)) { + if (chosen_symset_start) { + i = 0; + while (known_restrictions[i]) { + if (!strcmpi(known_restrictions[i], bufp)) { switch(i) { case 0: symset[which_set].primary = 1; break; @@ -2635,9 +2636,10 @@ int which_set; break; } break; /* while loop */ - } - i++; - } + } + i++; + } + } break; } } else { /* !SYM_CONTROL */