windowscodecs: Don't treat S_FALSE as failure.
Vincent Povirk
madewokherd at gmail.com
Fri Nov 29 12:54:23 CST 2013
-------------- next part --------------
From 2d82ed62ddef1846db3ce22a5eecdd9c2e270cff Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
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 39de709..64386d5 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 5ce8fa0..b8895ee 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;
}
--
1.8.1.2
More information about the wine-patches
mailing list