Re: Duping Bugfix

From: George (greerga@CIRCLEMUD.ORG)
Date: 01/16/98


On Fri, 16 Jan 1998, Drago's wrote:

>>You cannot make ANY new characters with the code like that.
>>
>>Let us think logically:
>>  We scan the descriptor list for every character
>>    If the person we're checking has a name, check the next one.
>>    If the person does not have a name, return invalid name.
>
>I should be kicked, however this is PASTED from my code, and it works:
>
>  for (dt = descriptor_list; dt; dt = dt->next)
>    if (!GET_NAME(dt->character))
>      continue;
>    else
>      return FALSE;

Actually, that won't work either, you just flipped my two possibilities I
left quoted above.

Creating character 'Jack'
descriptor_list = <new person> (*), Bob, Foo, Bar, Baz, Etc, Someone

if (!GET_NAME(<newperson>) [TRUE] -> continue;
if (!GET_NAME(<Bob>) [FALSE] -> return invalid name.

So you're not even evaluating what 'tmp_name' is to see if it is invalid!

(*) - New connections are prepended to the list.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST