changeset 25629:f092ffdc7770

maint: merge stable to default.
author Rik <rik@octave.org>
date Mon, 16 Jul 2018 12:34:10 -0700
parents 45bd3edcbbcf (current diff) a0d642f24349 (diff)
children d1216d085280
files
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/inputParser.m	Sun Jul 15 18:01:52 2018 -0700
+++ b/scripts/miscellaneous/inputParser.m	Mon Jul 16 12:34:10 2018 -0700
@@ -448,6 +448,9 @@
 
         if (this.StructExpand && isstruct (name) && isscalar (name))
           expanded_options = [fieldnames(name) struct2cell(name)]'(:);
+          if (isempty (expanded_options))
+            continue;  # empty, continue to next argument
+          endif
           n_new_args = numel (expanded_options) -1;
           pnargin += n_new_args;
           varargin(vidx+n_new_args+1:pnargin) = varargin(vidx+1:end);