mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dticon: fix for \n being truncated by snprintf off end of error message
This commit is contained in:
parent
73188e842e
commit
0f87b89354
1 changed files with 2 additions and 2 deletions
|
@ -2292,8 +2292,8 @@ SaveSession( void )
|
||||||
if ((fd = creat(path, S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP)) == -1)
|
if ((fd = creat(path, S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP)) == -1)
|
||||||
{
|
{
|
||||||
tmpStr = GETSTR(16,24, "Couldn't save session to file");
|
tmpStr = GETSTR(16,24, "Couldn't save session to file");
|
||||||
tmpStr2 = (char *)XtMalloc(strlen(tmpStr) + strlen(path)+ 3);
|
tmpStr2 = (char *)XtMalloc(strlen(tmpStr) + strlen(path) + 4); /* +4 = ':', ' ', '\n' and '\0' */
|
||||||
snprintf(tmpStr2, strlen(tmpStr) + strlen(path) + 3, "%s: %s\n", tmpStr, path);
|
snprintf(tmpStr2, strlen(tmpStr) + strlen(path) + 4, "%s: %s\n", tmpStr, path);
|
||||||
_DtSimpleErrnoError(progName, DtError, NULL, tmpStr2, NULL);
|
_DtSimpleErrnoError(progName, DtError, NULL, tmpStr2, NULL);
|
||||||
XtFree(tmpStr2);
|
XtFree(tmpStr2);
|
||||||
XtFree ((char *)path);
|
XtFree ((char *)path);
|
||||||
|
|
Loading…
Reference in a new issue