summaryrefslogtreecommitdiffstats
path: root/src/Section.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Section.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Section.cpp b/src/Section.cpp
index 67dde70..e6b6d93 100644
--- a/src/Section.cpp
+++ b/src/Section.cpp
@@ -69,9 +69,11 @@ BlockId Section::GetBlockId(Vector pos) const {
if (block.empty())
return BlockId{ 0,0 };
- auto iter = overrideList.find(pos);
- if (iter != overrideList.end())
- return iter->second;
+ if (!overrideList.empty()) {
+ auto iter = overrideList.find(pos);
+ if (iter != overrideList.end())
+ return iter->second;
+ }
int value;
@@ -104,7 +106,7 @@ BlockId Section::GetBlockId(Vector pos) const {
BlockId blockId;
blockId.id = value >> 4;
- blockId.state = value & 0xF;
+ blockId.state = value & 0xF;
return blockId;
}