Serge Gautherie : winapi_test: Do not multiply type size when it is undefined, in _refresh().

Alexandre Julliard julliard at winehq.org
Tue Apr 14 16:15:26 CDT 2020


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

Author: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
Date:   Tue Apr 14 11:47:23 2020 +0200

winapi_test: Do not multiply type size when it is undefined, in _refresh().

Signed-off-by: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/winapi/c_type.pm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tools/winapi/c_type.pm b/tools/winapi/c_type.pm
index b00cf81894..c6aeb6a912 100644
--- a/tools/winapi/c_type.pm
+++ b/tools/winapi/c_type.pm
@@ -239,8 +239,14 @@ sub _refresh($)
             }
             else
             {
-	      print STDERR "$type_name -> type_size=undef, count=$count\n" if (!defined $type_size);
-                $type_size *= int($count);
+                if (!defined $type_size)
+                {
+                    print STDERR "$type_name -> type_size=undef, count=$count\n";
+                }
+                else
+                {
+                    $type_size *= int($count);
+                }
             }
         }
         if ($bitfield_size != 0)




More information about the wine-cvs mailing list