mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
d3dx9_36-DrawText: Merge improvement by Alistair Leslie-Hughes.
This commit is contained in:
parent
a5fac42aff
commit
e4d5d84401
@ -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 <titan.costa@gmail.com>
|
||||
Date: Sun, 26 May 2013 19:42:08 +0200
|
||||
Subject: d3dx9_36: Implement ID3DXFontImpl_DrawText.
|
||||
@ -21,7 +21,7 @@ Changes by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user