Make sure pid and counter don't interfere

This commit is contained in:
Colin Leroy-Mira
2025-06-14 13:02:28 +02:00
parent 89651fd8bd
commit e3f9a5f052

View File

@@ -169,7 +169,7 @@ char* MakeTmpFilename (const char *Directory, const char *Origin, const char* Ex
Len += strlen (Origin) + (strlen (".2147483648") * 2) + strlen (Ext) + 1;
Out = xmalloc (Len);
snprintf (Out, Len, "%s%s.%u%u%s", (Directory != NULL ? Directory : ""),
snprintf (Out, Len, "%s%s.%u.%u%s", (Directory != NULL ? Directory : ""),
FindName(Origin), getpid(), Counter, Ext);
Counter++;