From: Ari Johnson Date: Thu, 5 Apr 2007 14:32:28 +0000 (+0000) Subject: Changed a for() loop to a memcpy when searching by powers X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=1c3c4022b8d86110a51af99e073f39c14ca8d102;p=cobramush.git Changed a for() loop to a memcpy when searching by powers --- 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. */