From aae29e8220b94c604b20f29004fadddc7d6e2ad5 Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 9 Aug 2001 13:02:49 +0000 Subject: Fix for FreeBSD/13278, from FreeBSD: When a game ends that makes the top 10, the function insert_score in score.c is called to make the new score file. But the case for KFIRE (killed by fire) incorrectly uses strcpy instead of strcat (all the other cases use strcat). This puts the string in the wrong place and corrupts the score file. --- rogue/score.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rogue/score.c') diff --git a/rogue/score.c b/rogue/score.c index 3ef52dcd..e0f64592 100644 --- a/rogue/score.c +++ b/rogue/score.c @@ -1,4 +1,4 @@ -/* $NetBSD: score.c,v 1.8 1999/09/12 09:02:23 jsm Exp $ */ +/* $NetBSD: score.c,v 1.9 2001/08/09 13:02:49 wiz Exp $ */ /* * Copyright (c) 1988, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: score.c,v 1.8 1999/09/12 09:02:23 jsm Exp $"); +__RCSID("$NetBSD: score.c,v 1.9 2001/08/09 13:02:49 wiz Exp $"); #endif #endif /* not lint */ @@ -369,7 +369,7 @@ insert_score(scores, n_names, n_name, rank, n, monster, other) (void) strcat(buf, "a total winner"); break; case KFIRE: - (void) strcpy(buf, "killed by fire"); + (void) strcat(buf, "killed by fire"); break; } } else { -- cgit v1.2.3-56-ge451