Add fix for PropertyBag_GetPropertyInfo.

This commit is contained in:
Michael Müller
2014-08-07 02:44:50 +02:00
parent 4b4ea9fd2e
commit 1ca9157daa
4 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
From 782be7241e1a135c1645a09b30d95d020c7af8e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 7 Aug 2014 02:41:09 +0200
Subject: windowscodecs: Fix number of returned properties in
PropertyBag_GetPropertyInfo.
---
dlls/windowscodecs/propertybag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c
index 02914ec..11fa5b1 100644
--- a/dlls/windowscodecs/propertybag.c
+++ b/dlls/windowscodecs/propertybag.c
@@ -248,7 +248,7 @@ static HRESULT WINAPI PropertyBag_GetPropertyInfo(IPropertyBag2 *iface, ULONG iP
if (iProperty+cProperties > This->prop_count )
return WINCODEC_ERR_VALUEOUTOFRANGE;
- *pcProperties = max(cProperties, This->prop_count-iProperty);
+ *pcProperties = min(cProperties, This->prop_count-iProperty);
for (i=0; i < *pcProperties; i++)
{
--
1.8.3.2

View File

@@ -0,0 +1,4 @@
Author: Michael Müller
Subject: Fix number of returned properties in PropertyBag_GetPropertyInfo.
Revision: 1
Fixes: [37005] Fix number of returned properties in PropertyBag_GetPropertyInfo