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
This commit is contained in:
Jilles Tjoelker 2004-01-06 13:11:07 +00:00
parent 7e84a8baae
commit 974f567f04
1 changed files with 1 additions and 1 deletions

View File

@ -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);