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:
parent
7e84a8baae
commit
974f567f04
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue