From 974f567f043e10cdb4772faae49f838d66a24d8c Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 6 Jan 2004 13:11:07 +0000 Subject: [PATCH] snprintf() size argument was 1 too small, so MAIL variable always missed last char. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@104 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- dgamelaunch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 4c57f86..d3d1771 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -1441,7 +1441,7 @@ main (int argc, char** argv) len = strlen(myconfig->spool) + strlen (me->username) + 1; spool = malloc (len + 1); - snprintf (spool, len, "%s/%s", myconfig->spool, me->username); + snprintf (spool, len + 1, "%s/%s", myconfig->spool, me->username); setenv ("NETHACKOPTIONS", atrcfilename, 1); setenv ("MAIL", spool, 1);