From fa990afbbc4ac09f06be847d35e47389364acf98 Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 25 Mar 2020 21:28:07 +0300 Subject: [PATCH] d3d11: Use stricmp() instead of _strnicmp(..., -1). Fixes Epic Games Launcher crash with native ucrtbase.dll. Signed-off-by: Paul Gofman Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d11/inputlayout.c | 2 +- dlls/d3d11/shader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3d11/inputlayout.c b/dlls/d3d11/inputlayout.c index 9bee927a7be..e27984212bc 100644 --- a/dlls/d3d11/inputlayout.c +++ b/dlls/d3d11/inputlayout.c @@ -30,7 +30,7 @@ static struct wined3d_shader_signature_element *shader_find_signature_element(co for (i = 0; i < s->element_count; ++i) { - if (!_strnicmp(e[i].semantic_name, semantic_name, -1) && e[i].semantic_idx == semantic_idx + if (!stricmp(e[i].semantic_name, semantic_name) && e[i].semantic_idx == semantic_idx && e[i].stream_idx == stream_idx) return &e[i]; } diff --git a/dlls/d3d11/shader.c b/dlls/d3d11/shader.c index 6bec79740ba..d51d8e4e60b 100644 --- a/dlls/d3d11/shader.c +++ b/dlls/d3d11/shader.c @@ -1024,7 +1024,7 @@ static HRESULT validate_stream_output_entries(const D3D11_SO_DECLARATION_ENTRY * continue; if (e1->Stream == e2->Stream - && !_strnicmp(e1->SemanticName, e2->SemanticName, -1) + && !stricmp(e1->SemanticName, e2->SemanticName) && e1->SemanticIndex == e2->SemanticIndex && e1->StartComponent < e2->StartComponent + e2->ComponentCount && e1->StartComponent + e1->ComponentCount > e2->StartComponent)