]> skyeroc.xyz Git - dgamelaunch/commitdiff
snprintf() size argument was 1 too small, so MAIL variable always missed
authorJilles Tjoelker <jilles@stack.nl>
Tue, 6 Jan 2004 13:11:07 +0000 (13:11 +0000)
committerJilles Tjoelker <jilles@stack.nl>
Tue, 6 Jan 2004 13:11:07 +0000 (13:11 +0000)
last char.

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@104 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index 4c57f86d6817a599bb51aea5f219b4b3c9b443c1..d3d177118b0b9a8c6330d6edc7e91d428518f403 100644 (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);