mirror of
https://github.com/paxed/dgamelaunch.git
synced 2025-04-08 17:06:19 +02:00
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;
|
len = strlen(myconfig->spool) + strlen (me->username) + 1;
|
||||||
spool = malloc (len + 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 ("NETHACKOPTIONS", atrcfilename, 1);
|
||||||
setenv ("MAIL", spool, 1);
|
setenv ("MAIL", spool, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user