and generate invalid calls to the optimisers.
Previously ego would generate a temporary file template that looked like
/tmp/ego.A.BB.XXXXXX, call mktemp() on it to randomise the XXXXXX, and then
replace A and BB with data.
However, it used strrchr to find the A and B. Which would fine, except when
mktemp produced an A or a B in the randomised part...
This code was written on 4 March 1991. I was 16.
(void)strcat(pdump, "/ego.pd.XXXXXX");
(void)mktemp(pdump);
- (void)strcat(tmpbufs[0], "/ego.A.BB.XXXXXX");
+ (void)strcat(tmpbufs[0], "/ego.XXXXXX");
(void)mktemp(tmpbufs[0]);
+ (void)strcat(tmpbufs[0], ".A.BB");
for (i = 2 * NTEMPS - 1; i >= 1; i--)
{
(void)strcpy(tmpbufs[i], tmpbufs[0]);