Browse Source

DtTerm/TermPrimUtil: Use 6 'X's in mktemp template

Some implementations (e.g. glibc) require that, while implementations
that are fine with 5 of them still work the same (just with one more
constant letter)
Patrick Georgi 3 months ago
parent
commit
9dca44513c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cde/lib/DtTerm/TermPrim/TermPrimUtil.c

+ 2 - 2
cde/lib/DtTerm/TermPrim/TermPrimUtil.c

@@ -404,10 +404,10 @@ _DtTermPrimStartLog(Widget w)
     if ( tw->term.log_on || tw->term.logInhibit ) { return; }
 
     if (!tw->term.logFile || !*tw->term.logFile) {
-	tw->term.logFile = "DttermLogXXXXX";
+	tw->term.logFile = "DttermLogXXXXXX";
     }
 
-    if (!strcmp(tw->term.logFile + strlen(tw->term.logFile) - 5, "XXXXX")) {
+    if (!strcmp(tw->term.logFile + strlen(tw->term.logFile) - 6, "XXXXXX")) {
 	/* make a local copy in case we are going to change it... */
 	cp = XtMalloc(strlen(tw->term.logFile) + 1);
 	(void) strcpy(cp, tw->term.logFile);