MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
1.8.0alpha3 delete_verb() bug and patch
There is a bug in verbs.c - bf_delete_verb() that prevented the builtin
function delete_verb() from doing very much. (Version 1.8.0alpha3)
Replace the following code in the bf_delete_verb() function in verbs.c:
if ((e = validate_verb_descriptor(desc)) != E_NONE)
/* Do nothing; e is already set. */
if (!valid(oid))
e = E_INVARG;
else if (!db_object_allows(oid, progr, FLAG_WRITE))
e = E_PERM;
else {
h = find_described_verb(oid, desc);
if (h.ptr)
db_delete_verb(h);
else
e = E_VERBNF;
}
With the following code:
if ((e = validate_verb_descriptor(desc)) == E_NONE) {
if (!valid(oid))
e = E_INVARG;
else if (!db_object_allows(oid, progr, FLAG_WRITE))
e = E_PERM;
else {
h = find_described_verb(oid, desc);
if (h.ptr)
db_delete_verb(h);
else
e = E_VERBNF;
}
}
This *should* fix the problem completely.
Brian
---
Brian Buchanan sysop@calbbs.com brian@wasteland.calbbs.com
-= ArchWizard of Digital Wasteland MOO (wasteland.calbbs.com 8888) =-
Follow-Ups:
Home |
Subject Index |
Thread Index