Package: tome
Version: 2.3.4-1
Severity: important
Tags: patch


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash-minimal

Versions of packages tome depends on:
ii  libc6                         2.5-11     GNU C Library: Shared libraries
ii  libncurses5                   5.5-5      Shared libraries for terminal hand
ii  libx11-6                      2:1.0.3-7  X11 client-side library
ii  libxaw7                       1:1.0.3-3  X11 Athena Widget library
ii  libxmu6                       1:1.0.3-1  X11 miscellaneous utility library
ii  libxt6                        1:1.0.5-2  X11 toolkit intrinsics library

tome recommends no packages.

-- no debconf information

When playing optional modules (downloadable from modules.t-o-m-e.net),
the directory for loading/saving game files is not correctly
initialized.  As a result, games and user preferences cannot be saved.

A simple patch to the src/modules.c file fixes the problem.
diff -ur tome-2.3.4/src/modules.c tome-2.3.4-patched/src/modules.c
--- tome-2.3.4/src/modules.c	2006-10-21 19:04:26.000000000 -0400
+++ tome-2.3.4-patched/src/modules.c	2007-06-14 22:23:23.000000000 -0400
@@ -14,13 +14,13 @@
 
 #ifdef PRIVATE_USER_PATH
 
-static void module_reset_dir_aux(cptr dir, cptr new_path)
+static void module_reset_dir_aux(cptr *dir, cptr new_path)
 {
 	char buf[1025];
-	cptr *d = &dir;
+	cptr *d = dir;
 
 	/* Build the new path */
-	strnfmt(buf, 1024, "%s%s%s", dir, PATH_SEP, new_path);
+	strnfmt(buf, 1024, "%s%s%s", *dir, PATH_SEP, new_path);
 
 	string_free(*d);
 	*d = string_make(buf);
@@ -75,12 +75,12 @@
 #ifdef PRIVATE_USER_PATH_DATA
 	else if (!strcmp(dir, "data"))
 	{
-		module_reset_dir_aux(ANGBAND_DIR_DATA, new_path);
+		module_reset_dir_aux(&ANGBAND_DIR_DATA, new_path);
 	}
 #endif
 	else if (!strcmp(dir, "save"))
 	{
-		module_reset_dir_aux(ANGBAND_DIR_SAVE, new_path);
+		module_reset_dir_aux(&ANGBAND_DIR_SAVE, new_path);
 
 		/* Tell the savefile code that we must not use setuid */
 		savefile_setuid = FALSE;

Reply via email to