mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Fix rac.Writer's TTag for branch nodes
This commit is contained in:
1 parent
be2963bffe
commit
e292a22ccb
2 files changed
+6
-2
No files matched your search
+5
-1
@@ -556,7 +556,11 @@ func (w *nodeWriter) writeIndex(n *node) error {
|
||||
}
|
||||
buf = buf[8*len(n.resources):]
|
||||
for i, o := range n.children {
|
||||
putU64LE(buf[8*i:], dPtr|resourceToTag(n.resources, o.tertiary))
|
||||
tag := uint64(0xFE << 56)
|
||||
if len(o.children) == 0 {
|
||||
tag = resourceToTag(n.resources, o.tertiary)
|
||||
}
|
||||
putU64LE(buf[8*i:], dPtr|tag)
|
||||
dPtr += o.dRangeSize
|
||||
}
|
||||
buf = buf[8*len(n.children):]
|
||||
|
||||
@@ -276,7 +276,7 @@ func TestWriterMultiLevelIndex(t *testing.T) {
|
||||
got[0x13C*bytesPerHexDumpLine:]
|
||||
|
||||
const want = "" +
|
||||
"00000000 72 c3 63 02 a0 24 00 ff 00 00 fc 00 00 00 00 ff |r.c..$..........|\n" +
|
||||
"00000000 72 c3 63 02 17 fa 00 fe 00 00 fc 00 00 00 00 fe |r.c.............|\n" +
|
||||
"00000010 00 00 04 01 00 00 00 ee 30 00 00 00 00 00 04 ff |........0.......|\n" +
|
||||
"00000020 30 10 00 00 00 00 01 ff e2 13 00 00 00 00 01 02 |0...............|\n" +
|
||||
"00000030 72 c3 63 ff 4c be 00 ff 00 00 00 00 00 00 00 ff |r.c.L...........|\n" +
|
||||
|
||||
Reference in new issue
Block a user