Skip to content

Commit

Permalink
[ci] make compatible to octave 5.2, fix ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 29, 2024
1 parent ade1919 commit 5b5bc49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jdict.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
end
if (idx.type == '.' && isnumeric(idx.subs))
val = val(idx.subs);
elseif ((strcmp(idx.type, '()') || idx.type == '.') && ismember(idx.subs, {'tojson', 'fromjson', 'v', 'keys', 'len'}) && i < oplen)
elseif ((strcmp(idx.type, '()') || strcmp(idx.type, '.')) && ischar(idx.subs) && ismember(idx.subs, {'tojson', 'fromjson', 'v', 'keys', 'len'}) && i < oplen)
if (strcmp(idx.subs, 'v'))
if (iscell(val) && strcmp(idxkey(i + 1).type, '()'))
idxkey(i + 1).type = '{}';
Expand All @@ -140,6 +140,9 @@
if (i < oplen)
val = jdict(val);
end
elseif (strcmp(idx.type, '.') && ischar(idx.subs) && strcmp(idx.subs, 'v') && oplen == 1)
i = i + 1;
continue;
elseif ((idx.type == '.' && ischar(idx.subs)) || (iscell(idx.subs) && ~isempty(idx.subs{1})))
onekey = idx.subs;
if (iscell(onekey))
Expand Down

0 comments on commit 5b5bc49

Please sign in to comment.