Skip to content

Commit

Permalink
Fix an issue where opening read-only and multi-page image files would…
Browse files Browse the repository at this point in the history
… cause them to be treated as only one-page images. (#32)
  • Loading branch information
sdottaka authored Nov 24, 2023
1 parent 5a7d8aa commit f7fc9d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WinIMergeLib/image.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class fipMultiPageEx : public fipMultiPage
{
FILE *fp = NULL;
#ifdef _WIN32
_wfopen_s(&fp, lpszPathName, L"r+b");
_wfopen_s(&fp, lpszPathName, L"rb");
if (fp != NULL && !read_only)
{
WCHAR szTempPathName[MAX_PATH];
Expand Down Expand Up @@ -196,7 +196,7 @@ class fipMultiPageEx : public fipMultiPage
#else
char filename[260];
snprintf(filename, sizeof(filename), "%ls", lpszPathName);
fp = fopen(filename, "r+b");
fp = fopen(filename, "rb");
#endif
if (fp != NULL)
{
Expand Down

0 comments on commit f7fc9d5

Please sign in to comment.