MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: 1.8.0alpha3 delete_verb() bug and patch
NA>I noticed this and was about to write on this list, but it looks
NA>like someone beat me to it. However, I would suggest the following
NA>patch instead:
NA> Replace the following code in the bf_delete_verb() function in verbs.c:
NA> if ((e = validate_verb_descriptor(desc)) != E_NONE)
NA> /* Do nothing; e is already set. */
NA> With the following code:
NA> if ((e = validate_verb_descriptor(desc)) != E_NONE);
NA> /* Do nothing; e is already set. */
Close, but that code has no effect other than setting e based on the
function call. I think Pavel had it inside an if statement for a reason.
The correct fix should be the change above, and in addition, an 'else' should
be placed before the 'if' on the next line, like so:
if ((e = validate_verb_descriptor(desc)) != E_NONE);
/* Do nothing; e is already set. */
else if (!valid(oid))
Which accomplishes the same task as the first patch I posted, but
looks better. (I had intended to do this at first, but I had forgotten
proper C syntax(too much MOO programming, I guess), and had omitted the
Brian
... Syntax? Why not, they tax everything else!
---
Brian Buchanan sysop@calbbs.com brian@wasteland.calbbs.com
-= ArchWizard of Digital Wasteland MOO (wasteland.calbbs.com 8888) =-
Home |
Subject Index |
Thread Index