fix size of arrays
authorMichael Wallner <mike@php.net>
Tue, 17 Oct 2017 08:48:48 +0000 (10:48 +0200)
committerMichael Wallner <mike@php.net>
Tue, 17 Oct 2017 08:48:48 +0000 (10:48 +0200)
src/types/decl_arg.c

index e62edf0b1fcf396745a9b076bfd7bc8c4369c181..b4acdb1c2b7aabd688057d3eeec6920d505e1035 100644 (file)
@@ -181,7 +181,7 @@ size_t psi_decl_arg_get_size(struct psi_decl_arg *darg)
 
        if (darg->var->array_size && darg->var->pointer_level > 1) {
                size = psi_t_size(PSI_T_POINTER) * darg->var->array_size;
-       } else if (darg->var->pointer_level) {
+       } else if (!darg->var->array_size && darg->var->pointer_level) {
                size = psi_t_size(PSI_T_POINTER);
        } else {
                switch (real->type) {