Skip to content

Commit

Permalink
use alternative test to avoid octave bug 57107
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Apr 8, 2023
1 parent 9b6be7b commit 8dcedad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion loadbj.m
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
fid = fopen(fname,'rb');
string = fread(fid,jsonopt('MaxBuffer',inf,opt),'uint8=>char')';
fclose(fid);
elseif(regexp(fname, '^\s*[\[\{SCHiUIulmLMhdDTFZN]'))
elseif(length(fname) && ~isempty(find(fname(1)=='[{SCHiUIulmLMhdDTFZN]')))
string=fname;
else
error_pos('input file does not exist or buffer is invalid');
Expand Down

0 comments on commit 8dcedad

Please sign in to comment.