From 21b8296dfae3dcc986be20fad433a432bede3fea Mon Sep 17 00:00:00 2001 From: nveid Date: Sun, 29 Oct 2006 18:27:12 +0000 Subject: [PATCH] divquotahotfix - Couldn't division anything correctly that wasn't in a division in the first place (cherry picked from commit 0908d98d6321ac41d0c231ef4ae3dd4b6e7cab55) --- src/division.c | 2 +- src/predicat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/division.c b/src/division.c index 0886058..cfb761d 100644 --- a/src/division.c +++ b/src/division.c @@ -1534,7 +1534,7 @@ division_set(dbref exec, dbref target, const char *arg2) return; } - if(Division(target)) + if(GoodObject(Division(target)) && Division(target)) change_quota(Division(target), cnt); if (Typeof(target) == TYPE_PLAYER) diff --git a/src/predicat.c b/src/predicat.c index 0007f6b..b5f4721 100644 --- a/src/predicat.c +++ b/src/predicat.c @@ -660,7 +660,7 @@ change_quota(dbref who, int payment) /* Check If Division Quota has to be adjusted now */ - if(!NoQuota(Division(who))) + if(GoodObject(Division(who)) && !NoQuota(Division(who))) (void) atr_add(Division(who), "RQUOTA", tprintf("%d", get_current_quota(Division(who)) + payment), GOD, NOTHING); -- 2.30.2