From 3462153a05197e4951ed6b65195829ed9cea980e Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Tue, 14 Apr 2020 11:47:23 +0200 Subject: [PATCH] winapi_test: Do not multiply type size when it is undefined, in _refresh(). Signed-off-by: Serge Gautherie Signed-off-by: Francois Gouget Signed-off-by: Alexandre Julliard --- 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 b00cf81894d..c6aeb6a9120 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)