Nicolas Le Cam : widl: Don' t generate memset calls with zero length parameter.

Alexandre Julliard julliard at winehq.org
Thu Nov 19 10:15:18 CST 2009


Module: wine
Branch: master
Commit: ca38b8b9515a506e89f9ef0ac3fc4e2f0da8d867
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ca38b8b9515a506e89f9ef0ac3fc4e2f0da8d867

Author: Nicolas Le Cam <niko.lecam at gmail.com>
Date:   Wed Nov 18 19:39:08 2009 +0100

widl: Don't generate memset calls with zero length parameter.

---

 tools/widl/typegen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index fdb2379..68e9da1 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -3298,7 +3298,7 @@ void print_phase_basetype(FILE *file, int indent, const char *local_var_prefix,
             size = 0;
         }
 
-        if (phase == PHASE_MARSHAL)
+        if (phase == PHASE_MARSHAL && alignment > 1)
             print_file(file, indent, "MIDL_memset(__frame->_StubMsg.Buffer, 0, (0x%x - (ULONG_PTR)__frame->_StubMsg.Buffer) & 0x%x);\n", alignment, alignment - 1);
         print_file(file, indent, "__frame->_StubMsg.Buffer = (unsigned char *)(((ULONG_PTR)__frame->_StubMsg.Buffer + %u) & ~0x%x);\n",
                     alignment - 1, alignment - 1);




More information about the wine-cvs mailing list