PaulMoore: ToME 2.3.5 crashes repeatably when trying to create a character dump file where the character has completed less than 10 lost sword quests, but more than 10 princess quests. The cause is the use of the wrong variable in the dump code - the following patch should fix it.

--- q_rand.c.orig       2008-05-12 19:44:03.000000000 +0100
+++ q_rand.c    2008-06-28 19:20:51.781250000 +0100
@@ -420,7 +420,7 @@
                if (lscnt > 10)
                        fprintf(hook_file, "\n You have completed %d lost sword quests.", pcnt);
                else if (lscnt > 1)
-                       fprintf(hook_file, "\n You have completed %s lost sword quests.", number[pcnt-2]);
+                       fprintf(hook_file, "\n You have completed %s lost sword quests.", number[lscnt-2]);
                else if (lscnt == 1)
                        fprintf(hook_file, "\n You have completed one lost sword quest.");
                else

The crash is caused by trying to index into the "number" array using the pcnt (princess quest count) variable, which is greater than 10. The "number" array only has 9 entries.

The only workaround is to find a few more lost swords before creating a dump file :-)

NeilStevens: Thank you, applying now.

BugReport915 (last edited 2008-06-28 19:46:58 by NeilStevens)