Rémi Bernon : widl: Fix sign handling in parameterized types signatures.

Alexandre Julliard julliard at winehq.org
Tue Jan 25 15:41:19 CST 2022


Module: wine
Branch: master
Commit: 21fa9fa36a17b7b805b6ea29c41dd3c5a682f154
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=21fa9fa36a17b7b805b6ea29c41dd3c5a682f154

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Jan 25 10:13:39 2022 +0100

widl: Fix sign handling in parameterized types signatures.

Unspecified sign should be mapped to signed integer / char.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/widl/typetree.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 5e1a73da3d2..dc4db35e835 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -211,13 +211,13 @@ static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t
         {
         case TYPE_BASIC_INT:
         case TYPE_BASIC_INT32:
-            n += strappend(buf, len, pos + n, type_basic_get_sign(type) < 0 ? "i4" : "u4");
+            n += strappend(buf, len, pos + n, type_basic_get_sign(type) <= 0 ? "i4" : "u4");
             return n;
         case TYPE_BASIC_INT64:
-            n += strappend(buf, len, pos + n, type_basic_get_sign(type) < 0 ? "i8" : "u8");
+            n += strappend(buf, len, pos + n, type_basic_get_sign(type) <= 0 ? "i8" : "u8");
             return n;
         case TYPE_BASIC_INT8:
-            assert(type_basic_get_sign(type) >= 0); /* signature string for signed char isn't specified */
+            assert(type_basic_get_sign(type) > 0); /* signature string for signed char isn't specified */
             n += strappend(buf, len, pos + n, "u1");
             return n;
         case TYPE_BASIC_FLOAT:




More information about the wine-cvs mailing list