Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
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
LoP 1.46
Author: Remcon
Submitted by: Remcon
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
Users Online
CommonCrawl, DotBot

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SWFOTE FUSS Bugfix List » [Bug] Crash when certain ship...
Forum Rules | Mark all | Recent Posts

[Bug] Crash when certain ships are bought
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Nov 6, 2005, 1:47 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: Crash when certain ships are bought
Danger: Critical - Crash bug. Possible file corruption.
Found by: Trelar/Egg/Keberus
Fixed by: Trelar/Keberus

This bugfix has been adapted from the SWFOTE 2.0 recode project.

---

ships.c, make_prototype_rooms

Locate:
         if( proom->room_type == SP_NOT_SET )
         {
            if( newroom->name )
               STRFREE( newroom->name );
            sprintf( buf, "SPARE ROOM FOR: %d", vnum );
            newroom->name = STRALLOC( buf );
            if( newroom->description )
               STRFREE( newroom->description );
            continue;
         }


Change to:
         if( proom->room_type == SP_NOT_SET )
         {
            if( newroom->name )
               STRFREE( newroom->name );
            sprintf( buf, "SPARE ROOM FOR: %d", vnum );
            newroom->name = STRALLOC( buf );
            if( newroom->description )
               STRFREE( newroom->description );
            newroom->description = STRALLOC( "" ); 
            continue;
         }


The Smaug code does not deal well with NULL strings when it comes to eventually saving an area file to disk, which is what happens when a new ship is bought. Once all of the details of a new ship have been allocated, the game issues a call to fold_area to save the update. Because of the NULL description, the game will promptly crash and you will also likely be left with a corrupted file as a result.
       
Pages:<< prev 1 next >>