summaryrefslogtreecommitdiffstats
path: root/src/Section.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-20 09:40:13 +0100
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-20 09:40:13 +0100
commit6d1038669a9a188015f7a19aed41084d8752891c (patch)
tree89f953ee40fb16876f83dd3c27627ed64abbcd1b /src/Section.cpp
parentCleanup Linux build flags (diff)
downloadAltCraft-6d1038669a9a188015f7a19aed41084d8752891c.tar
AltCraft-6d1038669a9a188015f7a19aed41084d8752891c.tar.gz
AltCraft-6d1038669a9a188015f7a19aed41084d8752891c.tar.bz2
AltCraft-6d1038669a9a188015f7a19aed41084d8752891c.tar.lz
AltCraft-6d1038669a9a188015f7a19aed41084d8752891c.tar.xz
AltCraft-6d1038669a9a188015f7a19aed41084d8752891c.tar.zst
AltCraft-6d1038669a9a188015f7a19aed41084d8752891c.zip
Diffstat (limited to 'src/Section.cpp')
-rw-r--r--src/Section.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Section.cpp b/src/Section.cpp
index 1083538..2f72411 100644
--- a/src/Section.cpp
+++ b/src/Section.cpp
@@ -4,6 +4,12 @@
#include <cstring>
void Section::CalculateHash() const {
+ if (block.empty()) {
+ hash = 0;
+ return;
+ }
+
+
size_t offset = 0;
std::vector<unsigned char> rawData;