changeset 28388:56e7b2bb1dc6 stable

Ignore empty arguments passed to print() (bug #58477). * __print_parse_opts__.m: Make first check on input arg isempty() and skip.
author Rik <rik@octave.org>
date Mon, 01 Jun 2020 09:05:16 -0700
parents 2b52e473b6ef
children 38ebf4885e0f
files scripts/plot/util/private/__print_parse_opts__.m
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__print_parse_opts__.m	Tue May 26 06:59:45 2020 +0200
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Mon Jun 01 09:05:16 2020 -0700
@@ -91,7 +91,9 @@
   for i = 1:numel (varargin)
     arg = strtrim (varargin{i});
     if (ischar (arg))
-      if (strcmp (arg, "-color"))
+      if (isempty (arg))
+        continue;
+      elseif (strcmp (arg, "-color"))
         arg_st.use_color = 1;
       elseif (strcmp (arg, "-append"))
         arg_st.append_to_file = true;