From 1a61a03be460b2a25d3cf9a34ecfd7a1f0893709 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard <julliard@winehq.org> Date: Sun, 28 Nov 1999 21:03:46 +0000 Subject: [PATCH] Bug fixes. --- tools/bin2res.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/bin2res.c b/tools/bin2res.c index 88589bab0ba..912ba8f7805 100644 --- a/tools/bin2res.c +++ b/tools/bin2res.c @@ -122,7 +122,7 @@ int insert_hex (char * infile, FILE * outfile) if (++i >= st.st_size) break; fprintf(outfile, "%s", (i == (i & 0xfffffff0)) ? "'\n '" :" "); } - fprintf (outfile, "'\n}\n"); + fprintf (outfile, "'\n}"); munmap(p_in_file, st.st_size); close(fd); return 1; @@ -140,8 +140,10 @@ int convert_to_res () int line = 0; time_t tinput; long startpos, endpos; - - tmpnam(tmpfile); + + strcpy( tmpfile, g_lpstrInputFile ); + strcat( tmpfile, "-tmp" ); + /* FIXME: should use better tmp name and create with O_EXCL */ if( (ftemp = fopen( tmpfile, "w")) == NULL ) goto error_open_file; if( (fin = fopen( g_lpstrInputFile, "r")) == NULL || stat(g_lpstrInputFile, &st)) goto error_open_file; -- GitLab