Skip to content

Commit 3d88a9e

Browse files
committed
calc data end from correct start
1 parent 73b6b5c commit 3d88a9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hekatoolslib/hkTree.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ namespace hkLib {
124124
LevelSizes.push_back(root->LevelSizes[i]);
125125
}
126126
char* data = buffer + root_bytes; // start of first tree node
127-
LoadToNode(nullptr, RootNode, &data, data + len, 0);
127+
LoadToNode(nullptr, RootNode, &data, buffer + len, 0);
128128
if (data - buffer != static_cast<std::ptrdiff_t>(len)) {
129129
throw std::runtime_error("bytes read != bytes in buffer");
130130
}

0 commit comments

Comments
 (0)