Add new comment

Here is the patch:

Here is the patch:

diff --git a/dcraw/dcraw.c b/dcraw/dcraw.c
index fb78663..87915d9 100644
--- a/dcraw/dcraw.c
+++ b/dcraw/dcraw.c
@@ -2768,7 +2768,7 @@ void CLASS unpacked_load_raw()
while (1 << ++bits < maximum)
;
read_shorts(raw_image, raw_width * raw_height);
- if (maximum < 0xffff)
+ if (maximum < 0xffff || load_flags)
for (row = 0; row < raw_height; row++)
{
#ifdef LIBRAW_LIBRARY_BUILD
diff --git a/internal/dcraw_common.cpp b/internal/dcraw_common.cpp
index 168a095..d8e22e6 100644
--- a/internal/dcraw_common.cpp
+++ b/internal/dcraw_common.cpp
@@ -2472,7 +2472,7 @@ void CLASS unpacked_load_raw()
while (1 << ++bits < maximum)
;
read_shorts(raw_image, raw_width * raw_height);
- if (maximum < 0xffff)
+ if (maximum < 0xffff || load_flags)
for (row = 0; row < raw_height; row++)
{
#ifdef LIBRAW_LIBRARY_BUILD

-- Alex Tutubalin @LibRaw LLC