You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2021/03/03 18:37:12 UTC

[openoffice] 01/02: fix unitialized variables in delivery.pl by treat undef as 0 changed: ../solenv/bin/deliver.pl

This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 33e2b206e9e008c28b40f20e9050f412c48113e3
Author: Peter Kovacs <pe...@apache.org>
AuthorDate: Sat Apr 25 04:55:17 2020 +0200

    fix unitialized variables in delivery.pl by treat undef as 0
    	changed:       ../solenv/bin/deliver.pl
---
 main/solenv/bin/deliver.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/main/solenv/bin/deliver.pl b/main/solenv/bin/deliver.pl
index 1205b9c..f4b9df4 100755
--- a/main/solenv/bin/deliver.pl
+++ b/main/solenv/bin/deliver.pl
@@ -973,6 +973,9 @@ sub get_latest_patchlevel
 
         for ($i = 0; $i < 3; $i++)
           {
+              # if unitialized assign 0 as default value.
+              $field_a[$i] //= 0;
+              $field_b[$i] //= 0;
               if ( ($field_a[$i] < $field_b[$i]) ) {
                   return -1;
               }