summaryrefslogtreecommitdiff
path: root/src/wins.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-02-13 19:44:37 +0000
committerFrederic Culot <calcurse@culot.org>2008-02-13 19:44:37 +0000
commitfe5621c5472a65e0900f57ae2da61eab4b1469fd (patch)
treecdd513a85d7918f908edbc1e5171e0ebcd88e7e1 /src/wins.c
parent45199e1df924a4ffb3a481caea79891318e15c62 (diff)
downloadcalcurse-fe5621c5472a65e0900f57ae2da61eab4b1469fd.zip
manpage updated
NOTESIZ shortened to be 6 characters long, as only 6 'X' are used in the glibc version of mkstemp(3). bugfix: wrong calculated len in wins_launch_external(), which lead to erroneus note file name
Diffstat (limited to 'src/wins.c')
-rwxr-xr-xsrc/wins.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wins.c b/src/wins.c
index 302bb04..34da23c 100755
--- a/src/wins.c
+++ b/src/wins.c
@@ -1,4 +1,4 @@
-/* $Id: wins.c,v 1.10 2008/02/10 16:29:50 culot Exp $ */
+/* $Id: wins.c,v 1.11 2008/02/13 19:44:37 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -374,7 +374,8 @@ wins_launch_external(const char *file, const char *cmd)
char *p;
int len;
- len = strlen(file) + strlen(cmd) + 1;
+ len = strlen(file) + strlen(cmd) + 2; /* Beware of space between cmd and
+ file. */
p = (char *)malloc(sizeof(char) * len);
if (snprintf(p, len, "%s %s", cmd, file) == -1) {
free(p);