Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 Couple bugs
Yesterday, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot, Google

Members: 0
Guests: 18
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » - bug in some codebases
Forum Rules | Mark all | Recent Posts

- bug in some codebases
< Newer Topic :: Older Topic > - bug in some codebases

Pages:<< prev 1 next >>
Post is unread #1 Mar 5, 2003, 6:39 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

While I haven't looked to see if all other bases have this bug or not this is an easy way to see if your mud has this problem while on the mud type cast locate - or look - or mstat - or ostat - lol There are just alot of ways to find it lol. Anyways on to the fix if you need it

Open handler.c and find the nifty_is_name and nifty_is_name_prefix
in nifty_is_name change
  for(;;)
  {
    str = one_argument2(str, name);
    if(name[0] == '\0')
      return TRUE;
    if(!is_name2(name, namelist))
      return FALSE;
  }
to this
  for(;;)
  {
    str = one_argument2(str, name);
    if(name[0] == '\0')
      return FALSE;
    if(is_name2(name, namelist))
      return TRUE;
  }
in nifty_is_name_prefix change
  for(;;)
  {
    str = one_argument2(str, name);
    if(name[0] == '\0')
      return TRUE;
    if(!is_name2_prefix(name, namelist))
      return FALSE;
  }
to this
  for(;;)
  {
    str = one_argument2(str, name);
    if(name[0] == '\0')
      return FALSE;
    if(is_name2_prefix(name, namelist))
      return TRUE;
  }

Hope this helps everyone out :) and after testing it a good bit it seems to work right this way
       
Post is unread #2 Mar 6, 2003, 11:38 am
Go to the top of the page
Go to the bottom of the page

Orion
Master Member
GroupMembers
Posts35
JoinedNov 12, 2002

This fix has been found, by Samson, to be buggy. DO NOT USE THIS VERSION OF THE FIX. If you have applied this fix, revert your code. It causes problems in the display of inventories, and possibly in others as well.
       
Post is unread #3 Mar 6, 2003, 11:48 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

In the interest of details, check here to see what this fix was doing to me after being applied. The tradeoff wasn't worth it :P
       
Post is unread #4 Mar 6, 2003, 4:58 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Maybe It just wasn't clear enough look here for more info after i tested it on a stock afk code it should show more info on the fix :P
Click here to see info



<!--EDIT|Remcon|Mar 6 2003, 08:00 PM-->
       
Post is unread #5 Mar 6, 2003, 6:04 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Yes, and I'm telling you - that's exactly what I had in the code after I copied your fixes into place. I've once again tested this, and once again it created the same output problem and obj_from_room bugs when a person dies. There is no doubt - the fix simply does NOT work with the code we run on Alsherok, and by extension, AFKMud as well. They use the same code except for some internal area conversion routines and the APC update polling. Neither of which has anything at all to do with nifty_is_name. It may well work just fine for you, but that would imply you've made other changes to your codebase that make it work the way you're intending for it to work. As a result, it would be wreckless to assume the fix can just be applied at will to any Smaug base out there without some massive further checking. STOCK AFK may not manifest it just yet, keep in mind that *MY* test was done on a live world of objects and mobs, 99% of which won't exist in stock. It may well only manifest itself later down the road for you guys as well. It's not something I'd want to risk on a short-term fix now. Remembering what might have broken it next year could be difficult if not impossible.

As for the descriptor fix, I've seen it firsthand in situations that would normally boot me off. The Chronicles codebase as it exists at Orion's test site prove that, and I'll be implementing it on Alsherok soon to see what it does for us. The overflow can't crash us because of steps that were taken to prevent this long ago. It's also why we don't need things like the Sockguard to prevent connection spamming. Kris can attest to this. He's tried deliberately to flood the code and kick the mud offline. We hardly even noticed the attempt.

Try not to take this wrongly either. I'm merely stating how a perceived fix now could come back to bite you in the ass later. There are better solutions to such problems than band-aid fixes :)
       
Post is unread #6 Mar 6, 2003, 7:11 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Well if that way doesn't work sorry not sure what to tell you because there aren't a whole lot of ways to go about this and since I haven't seen a problem with the other one not sure what to do so lets see if any of you have a better way to change these to make them work :) all I realy did is make them look like the others around it do.
bool is_name2(const char *str, char *namelist)
{
  char name[MIL];

  for(;;)
  {
    namelist = one_argument2(namelist, name);
    if(name[0] == '\0')
      return FALSE;
    if(!str_cmp(str, name))
      return TRUE;
  }
}

bool is_name2_prefix(const char *str, char *namelist)
{
  char name[MIL];

  for(;;)
  {
    namelist = one_argument2(namelist, name);
    if(name[0] == '\0')
      return FALSE;
    if(!str_prefix(str, name))
      return TRUE;
  }
}
/* -Thoric Checks if str is a name in namelist supporting multiple keywords */
bool nifty_is_name(char *str, char *namelist)
{
  char name[MIL];

  if(!str || str[0] == '\0')
    return FALSE;
  for(;;)
  {
    str = one_argument2(str, name);
    if(name[0] == '\0')
      return TRUE;
    if(!is_name2(name, namelist))
      return FALSE;
  }
}
bool nifty_is_name_prefix(char *str, char *namelist)
{
  char name[MIL];

  if(!str || str[0] == '\0')
    return FALSE;
  for(;;)
  {
    str = one_argument2(str, name);
    if(name[0] == '\0')
      return TRUE;
    if(!is_name2_prefix(name, namelist))
      return FALSE;
  }
}

So now if its going to cause problems wouldn't the rest of it cause problems then? And you can't just take out the if(name[0]=='\0') return TRUE in them because then it never will return true just always false and thats if it returns anything at all :P And you can't just change the return TRUE to return FALSE and the return FALSE to return TRUE because well then it always seems to return FALSE even when it should return TRUE so the only way I had came up with was to make it look like the rest by changing return TRUE to return FALSE and changing !is_name2 and !is_name2_prefix to is_name2 and is_name2_prefix im open to suggestions on how to do this in a better way so that it doesn't cause problems down the road though :P
       
Post is unread #7 Mar 18, 2003, 11:41 am   Last edited Dec 1, 2007, 1:02 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

In case others have missed it, the solution to this problem lies in using the pager functions for spell_locate. There's a send_to_char statement in the function that is more or less looped over and over until the output is done. Problem is, if you do something like "cast locate -" you'll spam the output system into killing your connection. Change it to send_to_pager, and the worst that will now happen is you get a shortened list and the pager overflows. No biggie. So in the end, this wasn't a bug at all but just a poor choice of output functions.
       
Pages:<< prev 1 next >>