d3dxof: Remove assumption of 4 bytes pointers for LPSTR value.

Dylan Smith dylan.ah.smith at gmail.com
Thu May 19 17:35:17 CDT 2011


---
 dlls/d3dxof/parsing.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c
index c3bfba0..417194b 100644
--- a/dlls/d3dxof/parsing.c
+++ b/dlls/d3dxof/parsing.c
@@ -1140,7 +1140,7 @@ static BOOL parse_object_members_list(parse_buffer * buf)
         {
           get_TOKEN(buf);
           TRACE("%s = %s\n", pt->members[i].name, (char*)buf->value);
-          if (!check_buffer(buf, 4))
+          if (!check_buffer(buf, sizeof(LPSTR)))
             return FALSE;
           if (pt->members[i].type == TOKEN_LPSTR)
           {
@@ -1153,7 +1153,7 @@ static BOOL parse_object_members_list(parse_buffer * buf)
             strcpy((char*)buf->cur_pstrings, (char*)buf->value);
             *(((LPCSTR*)(buf->cur_pos_data + buf->pdata))) = (char*)buf->cur_pstrings;
             buf->cur_pstrings += len;
-            buf->cur_pos_data += 4;
+            buf->cur_pos_data += sizeof(LPSTR);
           }
           else
           {
-- 
1.7.4.1



More information about the wine-patches mailing list