From e4d5d84401a58aa384f8cc19d78ed711741daddb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 26 Jul 2015 03:41:54 +0200 Subject: [PATCH] d3dx9_36-DrawText: Merge improvement by Alistair Leslie-Hughes. --- ...001-d3dx9_36-Implement-ID3DXFontImpl_DrawText.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/d3dx9_36-DrawText/0001-d3dx9_36-Implement-ID3DXFontImpl_DrawText.patch b/patches/d3dx9_36-DrawText/0001-d3dx9_36-Implement-ID3DXFontImpl_DrawText.patch index e26c84e1..7e877fbd 100644 --- a/patches/d3dx9_36-DrawText/0001-d3dx9_36-Implement-ID3DXFontImpl_DrawText.patch +++ b/patches/d3dx9_36-DrawText/0001-d3dx9_36-Implement-ID3DXFontImpl_DrawText.patch @@ -1,4 +1,4 @@ -From 4d6d770eb49046728e4262f796b1d1dd597d288d Mon Sep 17 00:00:00 2001 +From e8e425059101d8c719a8aea674f1c1da3d9a1085 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Sun, 26 May 2013 19:42:08 +0200 Subject: d3dx9_36: Implement ID3DXFontImpl_DrawText. @@ -21,7 +21,7 @@ Changes by Sebastian Lackner : 1 file changed, 210 insertions(+), 19 deletions(-) diff --git a/dlls/d3dx9_36/font.c b/dlls/d3dx9_36/font.c -index dd1243e..368c784 100644 +index dd1243e..7152dab 100644 --- a/dlls/d3dx9_36/font.c +++ b/dlls/d3dx9_36/font.c @@ -36,8 +36,29 @@ struct d3dx_font @@ -97,7 +97,7 @@ index dd1243e..368c784 100644 iface, sprite, debugstr_a(string), count, wine_dbgstr_rect(rect), format, color); - return 1; + -+ if (!string || !count) ++ if (!string || count <= 0) + return 0; + + countW = MultiByteToWideChar(CP_ACP, 0, string, count, NULL, 0); @@ -124,7 +124,7 @@ index dd1243e..368c784 100644 iface, sprite, debugstr_w(string), count, wine_dbgstr_rect(rect), format, color); - return 1; + -+ if (!string || !count) ++ if (!string || count <= 0) + return 0; + + /* Strip terminating NULL characters */ @@ -329,5 +329,5 @@ index dd1243e..368c784 100644 return D3D_OK; } -- -2.2.1 +2.4.5