Zebediah Figura : widl: Use IsSimpleRef only for explicitly declared arrays.

Alexandre Julliard julliard at winehq.org
Mon Nov 25 09:12:23 CST 2019


Module: wine
Branch: stable
Commit: 22b6b13efbc11c2264ffc0d7c21fbc1050272ceb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=22b6b13efbc11c2264ffc0d7c21fbc1050272ceb

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed May 29 00:24:05 2019 -0500

widl: Use IsSimpleRef only for explicitly declared arrays.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47285
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 02976b655a5d9ad8ee25dbfb2051acb5b7431381)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

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

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 27ba60fcf4..4b956448a8 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1059,9 +1059,16 @@ static unsigned char get_parameter_fc( const var_t *var, int is_return, unsigned
             case TGT_UNION:
             case TGT_USER_TYPE:
             case TGT_RANGE:
+                *flags |= MustFree;
+                if (!is_in && is_out) server_size = type_memsize( ref );
+                break;
             case TGT_ARRAY:
-                *flags |= IsSimpleRef | MustFree;
-                *typestring_offset = ref->typestring_offset;
+                *flags |= MustFree;
+                if (!type_array_is_decl_as_ptr(ref))
+                {
+                    *flags |= IsSimpleRef;
+                    *typestring_offset = ref->typestring_offset;
+                }
                 if (!is_in && is_out) server_size = type_memsize( ref );
                 break;
             case TGT_STRING:




More information about the wine-cvs mailing list