Skip to content

Commit

Permalink
flag to prevent embedding ND array size specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed May 13, 2020
1 parent a189a50 commit 86efe89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions loadubjson.m
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,13 @@
pos=pos+1;
[cc,pos]=next_char(inputstr,pos);
if(cc=='[')
if(isfield(varargin{1},'noembedding_') && varargin{1}.noembedding_==1)
error('ND array size specifier does not support embedding');
end
varargin{1}.noembedding_=1;
[dim, pos]=parse_array(inputstr, pos, varargin{:});
count=prod(double(dim));
varargin{1}.noembedding_=0;
else
[val,pos]=parse_number(inputstr,pos, varargin{:});
count=double(val);
Expand Down

0 comments on commit 86efe89

Please sign in to comment.