Skip to content

Commit 6c9088a

Browse files
committed
fix DumpBinaryFileDx
1 parent 9834831 commit 6c9088a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RisohEditor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ BOOL DumpBinaryFileDx(const WCHAR *filename, LPCVOID pv, DWORD size)
315315
using namespace std;
316316

317317
FILE *fp = _wfopen(filename, L"wb"); // open
318+
if (!fp)
319+
return FALSE;
318320

319321
int n = (int)fwrite(pv, size, 1, fp); // write
320-
321-
fflush(fp);
322322
fclose(fp); // close the files
323323

324324
return n == 1; // success or not

0 commit comments

Comments
 (0)