Skip to content

Commit 0f12110

Browse files
committed
Fix - checksum reading for foreign classes
1 parent 1f1a5f6 commit 0f12110

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

changes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
4. Fix - position of 3D canvas in webkit browsers
88
5. Fix - use abs bin content in RMS calculations
99
6. Fix - support char star* and object arrays in I/O
10+
7. Fix - correct decoding of TAxis time offset
11+
8. Fix - checksum reading for foreign classes
1012

1113

1214
## Changes in 4.7.0

scripts/JSRootIOEvolution.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,14 @@
173173
else
174174
this.o -= 4; // rollback read bytes, this is old buffer without bytecount
175175

176-
this.last_read_version = ver.val = this.ntou2();
176+
this.last_read_version = ver.val = this.ntoi2();
177177
ver.off = this.o;
178-
if (ver.val === 0) ver.checksum = this.ntou4(); // this is foreign class, extra stored checksum
178+
179+
if ((ver.val <= 0) && ver.bytecnt && (ver.bytecnt>=6)) {
180+
// this is foreign class, extra stored checksum
181+
ver.checksum = this.ntou4();
182+
}
183+
179184
return ver;
180185
}
181186

0 commit comments

Comments
 (0)