From ef178239f8a825e1c9dfde4c994a8eb7d680c9b2 Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 23 May 2011 22:53:25 +0000 Subject: Correctly print variables as strings, not as format string. --- hack/hack.main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'hack/hack.main.c') diff --git a/hack/hack.main.c b/hack/hack.main.c index cfa379b9..cb0537f3 100644 --- a/hack/hack.main.c +++ b/hack/hack.main.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.main.c,v 1.15 2010/02/03 15:34:38 roy Exp $ */ +/* $NetBSD: hack.main.c,v 1.16 2011/05/23 22:53:25 joerg Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hack.main.c,v 1.15 2010/02/03 15:34:38 roy Exp $"); +__RCSID("$NetBSD: hack.main.c,v 1.16 2011/05/23 22:53:25 joerg Exp $"); #endif /* not lint */ #include @@ -418,8 +418,10 @@ not_recovered: } if (multi < 0) { if (!++multi) { - pline(nomovemsg ? nomovemsg : - "You can move again."); + if (nomovemsg) + pline("%s", nomovemsg); + else + pline("You can move again."); nomovemsg = 0; if (afternmv) (*afternmv) (); -- cgit v1.2.3-56-ge451