From 7ab1b6ed8b9375428f0a7599c98fa310a4deb04c Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Thu, 26 Oct 2023 17:47:31 -0400 Subject: [PATCH] fix error for expecting an ending object mark when count is given --- loadbj.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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