[PATCH] wined3d: Avoid calling _strnicmp() with limit -1.
Dmitry Timoshkov
dmitry at baikal.ru
Tue Mar 29 08:02:20 CDT 2022
It's considered invalid by native ucrtbase (installed with winetricks).
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/wined3d/shader.c | 2 +-
dlls/wined3d/shader_sm4.c | 2 +-
dlls/wined3d/wined3d_main.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 6282883ed04..a296e34bc9f 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -3736,7 +3736,7 @@ static struct wined3d_shader_signature_element *shader_find_signature_element(co
for (i = 0; i < s->element_count; ++i)
{
if (e[i].stream_idx == stream_idx
- && !_strnicmp(e[i].semantic_name, semantic_name, -1)
+ && !stricmp(e[i].semantic_name, semantic_name)
&& e[i].semantic_idx == semantic_idx)
return &e[i];
}
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 868d9b3cc64..266b54d1d15 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -1319,7 +1319,7 @@ static void *shader_sm4_init(const DWORD *byte_code, size_t byte_code_size,
struct wined3d_shader_signature_element *e = &output_signature->elements[i];
if (priv->shader_version.type == WINED3D_SHADER_TYPE_PIXEL
- && _strnicmp(e->semantic_name, "SV_TARGET", -1))
+ && stricmp(e->semantic_name, "SV_TARGET"))
continue;
if (e->register_idx >= ARRAY_SIZE(priv->output_map))
{
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 4f50e8aeb7d..35973e210b0 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -329,17 +329,17 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
}
if (!get_config_key(hkey, appkey, env, "shader_backend", buffer, size))
{
- if (!_strnicmp(buffer, "glsl", -1))
+ if (!stricmp(buffer, "glsl"))
{
ERR_(winediag)("Using the GLSL shader backend.\n");
wined3d_settings.shader_backend = WINED3D_SHADER_BACKEND_GLSL;
}
- else if (!_strnicmp(buffer, "arb", -1))
+ else if (!stricmp(buffer, "arb"))
{
ERR_(winediag)("Using the ARB shader backend.\n");
wined3d_settings.shader_backend = WINED3D_SHADER_BACKEND_ARB;
}
- else if (!_strnicmp(buffer, "none", -1))
+ else if (!stricmp(buffer, "none"))
{
ERR_(winediag)("Disabling shader backends.\n");
wined3d_settings.shader_backend = WINED3D_SHADER_BACKEND_NONE;
--
2.35.1
More information about the wine-devel
mailing list