summaryrefslogtreecommitdiffstats
path: root/rogue/inventory.c
diff options
context:
space:
mode:
Diffstat (limited to 'rogue/inventory.c')
-rw-r--r--rogue/inventory.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rogue/inventory.c b/rogue/inventory.c
index 1293765d..ed0f9337 100644
--- a/rogue/inventory.c
+++ b/rogue/inventory.c
@@ -1,4 +1,4 @@
-/* $NetBSD: inventory.c,v 1.7 2002/07/07 09:35:08 tron Exp $ */
+/* $NetBSD: inventory.c,v 1.8 2002/10/01 14:18:57 mrg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)inventory.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: inventory.c,v 1.7 2002/07/07 09:35:08 tron Exp $");
+__RCSID("$NetBSD: inventory.c,v 1.8 2002/10/01 14:18:57 mrg Exp $");
#endif
#endif /* not lint */
@@ -421,14 +421,14 @@ void
mix_colors()
{
short i, j, k;
- char *t;
+ char t[MAX_ID_TITLE_LEN];
for (i = 0; i <= 32; i++) {
j = get_rand(0, (POTIONS - 1));
k = get_rand(0, (POTIONS - 1));
- t = id_potions[j].title;
- id_potions[j].title = id_potions[k].title;
- id_potions[k].title = t;
+ memcpy(t, id_potions[j].title, MAX_ID_TITLE_LEN);
+ memcpy(id_potions[j].title, id_potions[k].title, MAX_ID_TITLE_LEN);
+ memcpy(id_potions[k].title, t, MAX_ID_TITLE_LEN);
}
}