Skip to content

Commit 956e000

Browse files
committed
drop octave 3.x support, fix ubjson error in octave
1 parent e090f0a commit 956e000

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

loadubjson.m

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,7 @@
154154
global pos inStr isoct fileendian systemendian
155155
[cid,len]=elem_info(type);
156156
datastr=inStr(pos:pos+len*count-1);
157-
if(isoct)
158-
newdata=int8(datastr);
159-
else
160-
newdata=uint8(datastr);
161-
end
157+
newdata=uint8(datastr);
162158
id=strfind('iUIlLdD',type);
163159
if(fileendian~=systemendian)
164160
newdata=swapbytes(typecast(newdata,cid));
@@ -309,11 +305,7 @@ function parse_char(c)
309305
type={'int8','uint8','int16','int32','int64','single','double'};
310306
bytelen=[1,1,2,4,8,4,8];
311307
datastr=inStr(pos+1:pos+bytelen(id));
312-
if(isoct)
313-
newdata=int8(datastr);
314-
else
315-
newdata=uint8(datastr);
316-
end
308+
newdata=uint8(datastr);
317309
if(fileendian~=systemendian)
318310
newdata=swapbytes(typecast(newdata,type{id}));
319311
end

0 commit comments

Comments
 (0)