From a4d3dbf6a1d9cf14c1094c4da886f931bfaeff22 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Sun, 28 Apr 2013 22:46:01 +0200 Subject: [PATCH] d3dxof: Return correct error code in case of parsing failure. --- dlls/d3dxof/d3dxof.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index c865fd8c695..5a08b2126bc 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -241,8 +241,9 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV if (FAILED(hr)) goto error; - if (!parse_templates(&object->buf)) { - hr = DXFILEERR_BADVALUE; + if (!parse_templates(&object->buf)) + { + hr = DXFILEERR_PARSEERROR; goto error; } @@ -319,8 +320,9 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP if (FAILED(hr)) goto cleanup; - if (!parse_templates(&buf)) { - hr = DXFILEERR_BADVALUE; + if (!parse_templates(&buf)) + { + hr = DXFILEERR_PARSEERROR; goto cleanup; } @@ -1002,7 +1004,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE /* Check if there are templates defined before the object */ if (!parse_templates(&This->buf)) - return DXFILEERR_BADVALUE; + return DXFILEERR_PARSEERROR; if (!This->buf.rem_bytes) return DXFILEERR_NOMOREOBJECTS; -- 2.11.4.GIT