Skip to content

Commit

Permalink
calc data end from correct start
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHal committed Dec 6, 2024
1 parent 73b6b5c commit 3d88a9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hekatoolslib/hkTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace hkLib {
LevelSizes.push_back(root->LevelSizes[i]);
}
char* data = buffer + root_bytes; // start of first tree node
LoadToNode(nullptr, RootNode, &data, data + len, 0);
LoadToNode(nullptr, RootNode, &data, buffer + len, 0);
if (data - buffer != static_cast<std::ptrdiff_t>(len)) {
throw std::runtime_error("bytes read != bytes in buffer");
}
Expand Down

0 comments on commit 3d88a9e

Please sign in to comment.