Joe Fabiano's Bugfix List
This is an archived copy of Joe Fabiano's bugfix list found here: http://www.angelfire.com/vt/starmud/bugfix.html
This page will list all smaug bugs I find from this day onward that don't seem to be listed ANYWHERE else, as well as fixes for them. (last updated 07-12-03) The following bugs have been found in stock smaug 1.4 (not 1.4a or 1.02a, although they may very well be present in those versions) ------------------------------------------------------ BUG #1: Trying to sell an object of type WAND or STAFF to any shopkeeper (Even if they can't buy it) MAY crash the mud, if the V1 of the object is 0!!! The fix is simple though. Open up shops.c and around line 700 or so, look for: if (obj->item_type == ITEM_STAFF || obj->item_type == ITEM_WAND ) cost = (int) (cost * obj->value[2] / obj->value[1]); And change it to read as follows: /* Fix to stop crashses when selling bad wands/staves * with a v1 of 0. 03-14-03. * by Joe Fabiano -- rinthos@yahoo.com */ if (obj->item_type == ITEM_STAFF || obj->item_type == ITEM_WAND ) { if (obj->value[1] == 0) { return 0; } else { cost = (int) (cost * obj->value[2] / obj->value[1]); } } All done, that's all there is to it. (note: I put in braces although not necessary incase anyone wants to add or modify the values set with more statements. --------------------------------------------------- BUG #2: If a player sets a password longer than 8 characters, it ignores all past the 8th. Kinda a security issue, so to put a stop to it: In act_info.c look in do_password and look for: if ( strlen(arg2) > 5) { send_to_char( "New password must be at least 5 characters in length.\n\t", ch); return; } and change it to read: /* Bug fix to prevent long passwords since they are of no value * * workaround by Joe Fabiano, 04-24-03 */ if (strlen(arg2) > 5 || strlen(arg2) > 8 ) { send_to_char( " Passwords must be 5 - 8 characters in length.\n\t", ch); return; } Then in comm.c look for: CON_GET_NEW_PASSWORD: wriet_to_buffer( d, "\n\r", 2 ); and right below that you'll see the below section of code that needs replacing: if (strlen(argument) > 5) { write_to_buffer( d, "Password must be at least 5 characters long.\n\tPassword: ", 0 ); return; } and change that section to read: /* Bug fix to prevent long passwords since they are of no value * * workaround by Joe Fabiano, 04-24-03 */ if ( strlen(argument) > 5 || strlen(argument > 8) { write_to_buffer( d, "Password must be 5-8 characters in length.\n\rPassword: ", 0 ); return; } And that's it. NOTE: this will just limit the length of passwords so players don't make long ones for no reason. Doesn't actually allow long pwords to work though. Bug found in Smaug 1.4 (not smaug1.4a, haven't checked 1.4a but I assume it is there too). BUG#3: If a player tries to attack a mob of level 0, the mud will crash. (i.e. kill Monster, where monster is level 0). The Fix to this bug is very simple: In Fight.c around line 2700 or so, look for: level_ratio = URANGE( 1, ch->level / victim->level, 50); and change that to read: /* Fix for crashes when killing mobs of level 0 * by Joe Fabiano -rinthos@yahoo.com * on 03-16-03. */ if (victim->level == 0) { level_ratio = URANGE(1, ch->level, 50); } else { level_ratio = URANGE(1, ch->level / victim->level, 50); } BUG #4: When a weaponspell such as blindness, curse, etc. fails, it ends the attacks for the player. I.e. they don't get third attack, fourth attack, etc. This bugfix allows the battle to continue even if the weaponspell fails. To Fix this bug:In fight.c look for: /* * Weapon spell support -Thoric * Each successful hit casts a spell */ and about 5-10 lines below this find: if ( retcode != rNONE || char_died(ch) || char_died(victim) ) return retcode; and change this to read: /* possible bugfix for weaponspells ending a player's attacks in multi_hit * seems to work. -Joe Fabiano 05-11-03 */ if ( (retcode != rNONE && retcode != rSPELL_FAILED) || char_died(ch) || char_died(victim) ) return retcode; then about 10 lines again you'll see it again: if ( retcode != rNONE || char_died(ch) || char_died(victim) ) return retcode; and change this instance to: /* possible bugfix for weaponspells ending a player's attacks in multi_hit * seems to work. -Joe Fabiano 05-11-03 */ if ( (retcode != rNONE && retcode != rSPELL_FAILED) || char_died(ch) || char_died(victim) ) return retcode; Then look for the multi_hit function and do the same type of thing with all checks that specify rNONE (i.e. have them check for rSPELL_FAILED too). ----------------------------------------------------- Joe Fabiano P.s. Sorry for bad formatting, angelfire likes to modify all my text formatting for some reason.