changeset 30887:4bab8d3fce79

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Mon, 04 Apr 2022 00:20:48 -0400
parents 960909469245 (current diff) 05328c2145ff (diff)
children 32d2b6604a9f
files libinterp/corefcn/graphics.cc
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Sun Apr 03 11:30:26 2022 -0400
+++ b/libinterp/corefcn/graphics.cc	Mon Apr 04 00:20:48 2022 -0400
@@ -694,7 +694,7 @@
 convert_position (const Matrix& pos, const caseless_str& from_units,
                   const caseless_str& to_units, const Matrix& parent_dim)
 {
-  Matrix retval (1, pos.numel ());
+  Matrix retval (1, pos.numel (), 0.0);
   double res = 0;
   bool is_rectangle = (pos.numel () == 4);
   bool is_2D = (pos.numel () == 2);
@@ -829,8 +829,6 @@
             }
         }
     }
-  else if (! is_rectangle && ! is_2D)
-    retval(2) = 0;
 
   return retval;
 }