diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-07-22 10:58:10 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2008-07-22 10:58:10 +0000 |
commit | ea6a0421ff3e7d09ca273664b987a83af8e7a8fd (patch) | |
tree | 69598b1924715ce853a4b2d7f61827a367ebdf16 /ldid.cpp | |
parent | a960f39234fdc2738d3ad2de3de785f4287b6cb9 (diff) | |
download | ldid-ea6a0421ff3e7d09ca273664b987a83af8e7a8fd.tar.gz ldid-ea6a0421ff3e7d09ca273664b987a83af8e7a8fd.tar.zst ldid-ea6a0421ff3e7d09ca273664b987a83af8e7a8fd.zip |
Fixed a stupid bug in ldid that caused incorrect signatures occasionally.v1.0.371
Diffstat (limited to 'ldid.cpp')
-rw-r--r-- | ldid.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -498,7 +498,7 @@ int main(int argc, const char *argv[]) { for (size_t i = 0; i != pages - 1; ++i) sha1(hashes[i], top + 0x1000 * i, 0x1000); if (pages != 0) - sha1(hashes[pages - 1], top + 0x1000 * (pages - 1), data % 0x1000); + sha1(hashes[pages - 1], top + 0x1000 * (pages - 1), ((data - 1) % 0x1000) + 1); } } @@ -553,7 +553,7 @@ int main(int argc, const char *argv[]) { for (size_t i = 0; i != pages - 1; ++i) sha1(hashes[i], top + 0x1000 * i, 0x1000); if (pages != 0) - sha1(hashes[pages - 1], top + 0x1000 * (pages - 1), data % 0x1000); + sha1(hashes[pages - 1], top + 0x1000 * (pages - 1), ((data - 1) % 0x1000) + 1); directory->hashOffset = Swap(offset - begin); offset += sizeof(*hashes) * pages; |