Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 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
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, DotBot, Yahoo!

Members: 0
Guests: 21
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » do_hedit() allowing null argu...
Forum Rules | Mark all | Recent Posts

do_hedit() allowing null arguments...
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Apr 29, 2006, 8:35 am   Last edited Apr 29, 2006, 8:36 am by Halcyon
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

do_hedit() is allowing empty or NULL arguments to pass, and since get_help() is obviously never going to return a positive on it, this is going to allow help files with no names to end up in the list. I'm not *absolutely* sure what the eventual ramifications of this could be, but I'd venture to say it needs to not be happening regardless. :smile: Also, this problem if probably affecting all three codebases... It's in stock Smaug, as well as SWR, and I have to imagine it's probably in SW:FotE, too. It may be that they caught it, but somehow, I doubt it.

Anyway, in act_info.c, in function do_hedit(), find the following:

         STRFREE( pHelp->text );
         pHelp->text = copy_buffer( ch );
         stop_editing( ch );
         return;
   }


Directly below that, add:

   if( !argument || argument[0] == '\0' )
   {
	   send_to_char( "Edit which help file?\r\n", ch );
	   return;
   }


I suspect the reason this was being allowed was because when you return from the editing buffer, I don't think it passes your previous argument or anything, so if it disqualified a NULL argument, the help file would never be changed properly. However... This can be done without affecting that, so that's moot.
       
Post is unread #2 Apr 29, 2006, 7:26 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

Uhh... Are we speaking about just typing "hedit"? If so, that edits the main helpfile (by typing "help";).
       
Post is unread #3 Apr 30, 2006, 6:00 am   Last edited Apr 30, 2006, 6:06 am by Halcyon
Go to the top of the page
Go to the bottom of the page

Halcyon
Magician
GroupMembers
Posts187
JoinedApr 12, 2005

It's doesn't edit the main helpfile in SWR, at the very least. In fact, I just realized that if you enter the help editor with no arguments twice, you get a nasty crash. My mistake on the Smaug thing, then, I just double-checked it to be sure. You're right, that's the way that works, so that's fine. Like I said, though, SWR is creating help files with no name, and if you do it twice, BOOM.

Edit: Well... SOMETIMES, anyway. I can't really figure out what the criteria are, but sometimes it's causing a crash, and sometimes it's not. Seems to be something that's only happening after a hotboot, although I can't imagine why. Corrupted info leftover in the hash from the previous boot or something maybe? *Shrugs*
       
Post is unread #4 May 1, 2006, 8:36 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Good catch on the NULL thing, but I think to fix this I'll go ahead and duplicate the Smaug functionality on the SWR/SWFOTE side since it is desireable to be able to edit the "help help" file as it were.
       
Pages:<< prev 1 next >>