This is patch08 to PennMUSH 1.8.2. After applying this patch, you will have version 1.8.2p8 To apply this patch, save it to a file in your top-level 1.8.2p7 MUSH directory, and do the following: patch -p0 < 1.8.2-patch08 make update make install If you use GNU patch 2.2, you probably want the above to be 'patch -b -p0', not just 'patch -p0'. Unix (or cygwin) users need not worry about failed hunks in src/switchinc.c, hdrs/switches.h, hdrs/cmds.h, or hdrs/funs.h. These files are automatically rebuilt on compile. On the off chance they appear not to be, simply rm them and re-run make. Then @shutdown and restart your MUSH. - Shawn/Raevnos In this patch: Minor changes: * 'make versions' now provides some feedback. Fixes: * width() and height() do not return 0 when set to invalid input. By Talvo. * Array underflow bug found by running under Valgrind. * Crash bug when too many objects are nested. Reported by Paige, fixed by Javelin and Intervis. Prereq: 1.8.2p7 Index: Patchlevel =================================================================== --- Patchlevel (.../p7) (revision 1174) +++ Patchlevel (.../p8) (revision 1174) @@ -1,2 +1,2 @@ Do not edit this file. It is maintained by the official PennMUSH patches. -This is PennMUSH 1.8.2p7 +This is PennMUSH 1.8.2p8 Index: Makefile.SH =================================================================== --- Makefile.SH (.../p7) (revision 1174) +++ Makefile.SH (.../p8) (revision 1174) @@ -205,6 +205,7 @@ update-hdr: -@$touch options.h.dist + -@sleep 2 -@$perl utils/update.pl options.h options.h.dist test: netmud Index: src/utils.c =================================================================== --- src/utils.c (.../p7) (revision 1174) +++ src/utils.c (.../p8) (revision 1174) @@ -760,8 +760,6 @@ if (!GoodObject(room)) return NOTHING; while (!IsRoom(room)) { - if (!GoodObject(Location(room))) - return room; room = Location(room); rec++; if (rec > 20) Index: src/move.c =================================================================== --- src/move.c (.../p7) (revision 1174) +++ src/move.c (.../p8) (revision 1174) @@ -100,8 +100,9 @@ /* If the player is leaving a zone, do zone messages */ /* The tricky bit here is that we only care about the zone of * the outermost contents */ - if (GoodObject(absold) && GoodObject(Zone(absold)) - && (Zone(absloc) != Zone(absold))) + if (GoodObject(absold) && GoodObject(Zone(absold)) && + (!GoodObject(absloc) || !GoodObject(Zone(absloc)) || + (Zone(absloc) != Zone(absold)))) did_it_interact(what, Zone(absold), "ZLEAVE", NULL, "OZLEAVE", NULL, "AZLEAVE", old, NA_INTER_SEE); if (GoodObject(old) && !IsRoom(old)) @@ -111,27 +112,30 @@ did_it_interact(what, where, NULL, NULL, "OXENTER", NULL, NULL, old, NA_INTER_SEE); /* If the player is entering a new zone, do zone messages */ - if (!GoodObject(absold) - || (GoodObject(Zone(absloc)) && (Zone(absloc) != Zone(absold)))) + if (GoodObject(absloc) && GoodObject(Zone(absloc)) && + (!GoodObject(absold) || !GoodObject(Zone(absold)) || + (Zone(absloc) != Zone(absold)))) did_it_interact(what, Zone(absloc), "ZENTER", NULL, "OZENTER", NULL, "AZENTER", where, NA_INTER_SEE); - did_it_interact(what, where, "ENTER", NULL, "OENTER", T("has arrived."), - "AENTER", where, NA_INTER_PRESENCE); + did_it_interact(what, where, "ENTER", NULL, "OENTER", + T("has arrived."), "AENTER", where, NA_INTER_PRESENCE); } else { /* non-listeners only trigger the actions not the messages */ did_it(what, old, NULL, NULL, NULL, NULL, "ALEAVE", old); - if (GoodObject(absold) && GoodObject(Zone(absold)) - && (Zone(absloc) != Zone(absold))) + if (GoodObject(absold) && GoodObject(Zone(absold)) && + (!GoodObject(absloc) || !GoodObject(Zone(absloc)) || + (Zone(absloc) != Zone(absold)))) did_it(what, Zone(absold), NULL, NULL, NULL, NULL, "AZLEAVE", old); - if (!GoodObject(absold) - || (GoodObject(Zone(absloc)) && (Zone(absloc) != Zone(absold)))) + if (GoodObject(absloc) && GoodObject(Zone(absloc)) && + (!GoodObject(absold) || !GoodObject(Zone(absold)) || + (Zone(absloc) != Zone(absold)))) did_it(what, Zone(absloc), NULL, NULL, NULL, NULL, "AZENTER", where); did_it(what, where, NULL, NULL, NULL, NULL, "AENTER", where); } } if (!nomovemsgs) - did_it_interact(what, what, "MOVE", NULL, "OMOVE", NULL, "AMOVE", where, - NA_INTER_SEE); + did_it_interact(what, what, "MOVE", NULL, "OMOVE", NULL, + "AMOVE", where, NA_INTER_SEE); } /** A dropper is an object that can hear and has a connected owner */ Index: src/bsd.c =================================================================== --- src/bsd.c (.../p7) (revision 1174) +++ src/bsd.c (.../p8) (revision 1174) @@ -4263,7 +4263,7 @@ DESC *match; if (!*args[0]) safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); - else if ((match = lookup_desc(executor, args[0]))) + else if ((match = lookup_desc(executor, args[0])) && match->width > 0) safe_integer(match->width, buff, bp); else if (args[1]) safe_str(args[1], buff, bp); @@ -4276,7 +4276,7 @@ DESC *match; if (!*args[0]) safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); - else if ((match = lookup_desc(executor, args[0]))) + else if ((match = lookup_desc(executor, args[0])) && match->height > 0) safe_integer(match->height, buff, bp); else if (args[1]) safe_str(args[1], buff, bp); Index: src/strutil.c =================================================================== --- src/strutil.c (.../p7) (revision 1174) +++ src/strutil.c (.../p8) (revision 1174) @@ -992,7 +992,7 @@ str += strspn(str, " "); for (p = str; *p; p++) ; /* And trailing */ - for (p--; (*p == ' ') && (p > str); p--) ; + for (p--; p > str && *p == ' '; p--) ; p++; *p = '\0'; return str; Index: game/txt/hlp/pennv182.hlp =================================================================== --- game/txt/hlp/pennv182.hlp (.../p7) (revision 1174) +++ game/txt/hlp/pennv182.hlp (.../p8) (revision 1174) @@ -1,4 +1,4 @@ -& 1.8.2p7 +& 1.8.2p8 & changes This is a list of changes in this patchlevel which are probably of interest to players. More information about new commands and functions @@ -11,6 +11,19 @@ A list of the patchlevels associated with each release can be read in 'help patchlevels'. +Version 1.8.2 patchlevel 8 Jan 01, 2008 + +Minor changes: + * 'make versions' now provides some feedback. + +Fixes: + * width() and height() do not return 0 when set to invalid input. + By Talvo. + * Array underflow bug found by running under Valgrind. + * Crash bug when too many objects are nested. Reported by Paige, fixed + by Javelin and Intervis. + +& 1.8.2p7 Version 1.8.2 patchlevel 7 October 6, 2007 Minor changes: @@ -23,6 +36,8 @@ failure one. Reported by Cooee. * The open database file wasn't getting closed on a failed save. * Crash bug in sortkey(). Fix by Nathan Baum. + * Crash bug in pathological container cases reported by Paige@M*U*S*H + fixed by Javelin. * 'help @desc' brings up @describe instead of @descformat. Suggested by Nymeria. * Removed mention of Win32 requiring a particular attribute Index: game/txt/hlp/pennvOLD.hlp =================================================================== --- game/txt/hlp/pennvOLD.hlp (.../p7) (revision 1174) +++ game/txt/hlp/pennvOLD.hlp (.../p8) (revision 1174) @@ -4417,7 +4417,7 @@ For information on a specific patchlevel of one of the versions listed, type 'help p'. For example, 'help 1.7.2p3' -1.8.2: 0, 1, 2, 3, 4, 5, 6, 7 +1.8.2: 0, 1, 2, 3, 4, 5, 6, 7, 8 1.8.1: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 1.8.0: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 1.7.7: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, Index: UPGRADING =================================================================== --- UPGRADING (.../p7) (revision 1174) +++ UPGRADING (.../p8) (revision 1174) @@ -117,6 +117,11 @@ *** target version of PennMUSH. PennMUSH 1.7.7+ can no longer read *** 1.7.4 databases. +*** If you are upgrading from 1.7.6 or certain 1.7.7 versions, +*** you may also first need to load your database under PennMUSH +*** 1.8.0p13 and then dump it, and load this converted database +*** under your target version of PennMUSH. + ============================================================================ B. PennMUSH with a few hacks Index: CHANGES.182 =================================================================== --- CHANGES.182 (.../p7) (revision 1174) +++ CHANGES.182 (.../p8) (revision 1174) @@ -13,6 +13,18 @@ ========================================================================== +Version 1.8.2 patchlevel 8 Jan 01, 2008 + +Minor changes: + * 'make versions' now provides some feedback. + +Fixes: + * width() and height() do not return 0 when set to invalid input. + By Talvo. + * Array underflow bug found by running under Valgrind. + * Crash bug when too many objects are nested. Reported by Paige, fixed + by Javelin and Intervis. + Version 1.8.2 patchlevel 7 October 6, 2007 Minor changes: @@ -25,6 +37,8 @@ failure one. Reported by Cooee. * The open database file wasn't getting closed on a failed save. * Crash bug in sortkey(). Fix by Nathan Baum. + * Crash bug in pathological container cases reported by Paige@M*U*S*H + fixed by Javelin. * 'help @desc' brings up @describe instead of @descformat. Suggested by Nymeria. * Removed mention of Win32 requiring a particular attribute Index: utils/mkvershlp.pl =================================================================== --- utils/mkvershlp.pl (.../p7) (revision 1174) +++ utils/mkvershlp.pl (.../p8) (revision 1174) @@ -2,6 +2,8 @@ # # Generate game/txt/hlp/ files from the CHANGES file(s). # Should be run by Makefile from top-level directory +# +# Requires the extra Sort::Versions module. Install through CPAN. # # Usage: mkvershlp game/txt/hlp CHANGES.176 CHANGES.OLD ... # @@ -12,9 +14,17 @@ use Sort::Versions; use Text::Wrap; +BEGIN { + print "Rebuilding HELP CHANGES entries...\n"; +} + +END { + print "Done.\n"; +} + my $targetdir = shift; my @sources = @ARGV; -my $verspat = '^Version (\S+) patchlevel (\S+)'; +my $verspat = qr'^Version (\S+) patchlevel (\S+)'; my %patchlevels; @sources = sort byrevision @sources; @@ -22,10 +32,10 @@ my $really_started = 0; foreach my $file (@sources) { next if $file =~ /~$/o; - warn "Can't open $file!\n", next unless open(IN,"<$file"); + warn "Can't open $file!\n", next unless open IN, "<", $file; my $target = $file; $target =~ s/.*\.(.*)/pennv$1.hlp/; - open(OUT,">$targetdir/$target") or die "Unable to open $targetdir/$target\n"; + open(OUT,">","$targetdir/$target") or die "Unable to open $targetdir/$target\n"; my $started = 0; while () { if (/$verspat/o) { Index: hdrs/version.h =================================================================== --- hdrs/version.h (.../p7) (revision 1174) +++ hdrs/version.h (.../p8) (revision 1174) @@ -1,4 +1,4 @@ #define VERSION "1.8.2" -#define PATCHLEVEL "7" -#define PATCHDATE "[10/06/2007]" -#define NUMVERSION 1008002007 +#define PATCHLEVEL "8" +#define PATCHDATE "[01/01/2008]" +#define NUMVERSION 1008002008