r18220: $#foo returns the index of the last element not the count of elements,
authorStefan Metzmacher <metze@samba.org>
Thu, 7 Sep 2006 12:40:29 +0000 (12:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:17:52 +0000 (14:17 -0500)
so we need >= 0.

as 0 means one element

metze
(This used to be commit d8b5d0c9a75731c8627e8fabb364ec0ad0e9decd)

source4/build/smb_build/output.pm

index 5bdb4a417a1d667d1343fe970d894244dfccbaaf..92531835fabb3f5fdf7a2e6935ed0f9c8064f5a1 100644 (file)
@@ -133,7 +133,7 @@ sub create_output($$)
                        next if $elem == $part;
 
                        push(@{$part->{PUBLIC_CFLAGS}}, @{$elem->{CPPFLAGS}}) if (defined(@{$elem->{CPPFLAGS}}))
-                                                                             and ($#{$elem->{CPPFLAGS}} > 0);
+                                                                             and ($#{$elem->{CPPFLAGS}} >= 0);
 
                        next if not defined($elem->{CFLAGS});
                        next if $elem->{CFLAGS} eq "";