30 lines
748 B
Plaintext
30 lines
748 B
Plaintext
*** editor.c.orig Wed Jan 13 22:23:04 1999
|
|
--- editor.c Wed Jan 13 22:27:18 1999
|
|
***************
|
|
*** 652,660 ****
|
|
Display *display;
|
|
#endif
|
|
{
|
|
EditState = EDIT_TEST;
|
|
|
|
! strcpy(tempName, tempnam("/tmp", "xboing-"));
|
|
if (SaveLevelDataFile(display, tempName) == False)
|
|
ShutDown(display, 1, "Sorry, cannot save test play level.");
|
|
|
|
--- 652,666 ----
|
|
Display *display;
|
|
#endif
|
|
{
|
|
+ int fd;
|
|
+
|
|
EditState = EDIT_TEST;
|
|
|
|
! sprintf(tempName, "/tmp/xboing-XXXXXXXXXX");
|
|
! if ((fd = mkstemp(tempName)) < 0)
|
|
! ShutDown(display, 1, "Sorry, cannot save test play level.");
|
|
!
|
|
! close(fd);
|
|
if (SaveLevelDataFile(display, tempName) == False)
|
|
ShutDown(display, 1, "Sorry, cannot save test play level.");
|
|
|