From 3dc956a73004c98c3c96cb8635c28f7646bdbde8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Sep 2016 17:40:02 +0000 Subject: various minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@17257 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_mdb/src/dbintf.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp index 8dbc56fa22..c1f7500ccf 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdb/src/dbintf.cpp @@ -177,10 +177,10 @@ int CDbxMdb::Check(void) fseek(pFile, (LONG)iDefHeaderOffset, SEEK_SET); BYTE buf[_countof(bDefHeader)]; - if (fread(buf, 1, _countof(buf), pFile) != _countof(buf)) - return EGROKPRF_DAMAGED; - + size_t cbRead = fread(buf, 1, _countof(buf), pFile); fclose(pFile); + if (cbRead != _countof(buf)) + return EGROKPRF_DAMAGED; return (memcmp(buf, bDefHeader, _countof(bDefHeader))) ? EGROKPRF_UNKHEADER : 0; } -- cgit v1.2.3