Skip to content

Commit 5b5bc49

Browse files
committed
[ci] make compatible to octave 5.2, fix ci error
1 parent ade1919 commit 5b5bc49

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jdict.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
end
125125
if (idx.type == '.' && isnumeric(idx.subs))
126126
val = val(idx.subs);
127-
elseif ((strcmp(idx.type, '()') || idx.type == '.') && ismember(idx.subs, {'tojson', 'fromjson', 'v', 'keys', 'len'}) && i < oplen)
127+
elseif ((strcmp(idx.type, '()') || strcmp(idx.type, '.')) && ischar(idx.subs) && ismember(idx.subs, {'tojson', 'fromjson', 'v', 'keys', 'len'}) && i < oplen)
128128
if (strcmp(idx.subs, 'v'))
129129
if (iscell(val) && strcmp(idxkey(i + 1).type, '()'))
130130
idxkey(i + 1).type = '{}';
@@ -140,6 +140,9 @@
140140
if (i < oplen)
141141
val = jdict(val);
142142
end
143+
elseif (strcmp(idx.type, '.') && ischar(idx.subs) && strcmp(idx.subs, 'v') && oplen == 1)
144+
i = i + 1;
145+
continue;
143146
elseif ((idx.type == '.' && ischar(idx.subs)) || (iscell(idx.subs) && ~isempty(idx.subs{1})))
144147
onekey = idx.subs;
145148
if (iscell(onekey))

0 commit comments

Comments
 (0)