From 1c3c4022b8d86110a51af99e073f39c14ca8d102 Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Thu, 5 Apr 2007 14:32:28 +0000 Subject: [PATCH] Changed a for() loop to a memcpy when searching by powers --- src/wiz.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wiz.c b/src/wiz.c index ac4fdc8..79861fa 100644 --- a/src/wiz.c +++ b/src/wiz.c @@ -1976,7 +1976,6 @@ fill_search_spec(dbref player, const char *owner, int nargs, const char **args, spec->type = TYPE_PLAYER; } else if (string_prefix("powers", class)) { div_pbits tmpbits; - int i; /* Handle the checking later. */ if (!restriction || !*restriction) { notify(player, T("You must give a list of power names.")); @@ -1984,8 +1983,7 @@ fill_search_spec(dbref player, const char *owner, int nargs, const char **args, } spec->search_powers = 1; tmpbits = string_to_dpbits(restriction); - for (i = 0; i < DP_BYTES; i++) - spec->powers[i] = tmpbits[i]; + memcpy(spec->powers, tmpbits, DP_BYTES); mush_free(tmpbits, "POWER_SPOT"); } else if (string_prefix("flags", class)) { /* Handle the checking later. */ -- 2.30.2