diff --git a/loadbj.m b/loadbj.m index 13c1c45..e1af3c2 100644 --- a/loadbj.m +++ b/loadbj.m @@ -515,7 +515,7 @@ object.(encodevarname(str,varargin{:}))=val; end [cc, pos]=next_char(inputstr,pos); - if cc == '}' || (count>=0 && num>=count) + if (count>=0 && num>=count) || cc == '}' break; end end