]> granicus.if.org Git - nethack/commitdiff
region memory
authornethack.allison <nethack.allison>
Mon, 3 Jul 2006 14:21:21 +0000 (14:21 +0000)
committernethack.allison <nethack.allison>
Mon, 3 Jul 2006 14:21:21 +0000 (14:21 +0000)
<Someone> wrote on Tuesday, July 27, 2004 at 06:46:15
> In the region.c function rest_regions allocates storage for the possible
> enter_msg and leave_msg strings. But the function free_region does not relese
> this storage.

Also ensures that some code that is currently ifdef'd out
makes copies of the strings into memory from alloc()
to ensure that no problems with free() result if the function
gets passed a literal string.

doc/fixes34.4
src/region.c

index e3c78519532e0c1a764379de3c7737274a5dd388..8675fd471b9dd82d86db3830e7bc9a25a0fbd8e7 100644 (file)
@@ -240,6 +240,7 @@ bypass "wait! there's a creature hidden there" when attacking a hidden monster
 remove makedefs.c dependency that time_t and long are the same size
 terminal window set to 21 lines can cause a crash during player selection 
        menus; have bot() check for valid youmonst.data
+free storage used to hold region messages in free_region()
 
 
 Platform- and/or Interface-Specific Fixes
index d51ed315b35a49f8a304e0a1aae02b91a118531e..91ea28df05d4f47b8e75d7babc1afdc8412458f1 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)region.c   3.5     2006/06/27      */
+/*     SCCS Id: @(#)region.c   3.5     2006/07/02      */
 /* Copyright (c) 1996 by Jean-Christophe Collet         */
 /* NetHack may be freely redistributed.  See license for details. */