From 7a728d1813e4d887023c457def4a876ce9f97932 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 29 Nov 2013 12:43:41 -0600 Subject: [PATCH] windowscodecs: Don't treat S_FALSE as failure. --- dlls/windowscodecs/gifformat.c | 2 +- dlls/windowscodecs/jpegformat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/gifformat.c b/dlls/windowscodecs/gifformat.c index 39de709f55f..64386d5cf3e 100644 --- a/dlls/windowscodecs/gifformat.c +++ b/dlls/windowscodecs/gifformat.c @@ -1094,7 +1094,7 @@ static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) { } hr = IStream_Read(stream, data, len, &bytesread); - if (hr != S_OK) bytesread = 0; + if (FAILED(hr)) bytesread = 0; return bytesread; } diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index 5ce8fa0f3ce..b8895eebcdc 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -250,7 +250,7 @@ static jpeg_boolean source_mgr_fill_input_buffer(j_decompress_ptr cinfo) hr = IStream_Read(This->stream, This->source_buffer, 1024, &bytesread); - if (hr != S_OK || bytesread == 0) + if (FAILED(hr) || bytesread == 0) { return FALSE; }