summaryrefslogtreecommitdiffstats
path: root/src/LineBlockTracer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-16 23:22:00 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-16 23:22:00 +0200
commit960fcaa90c3ba4d57ff2205259471799e0418d12 (patch)
tree830621e8d033c5853052147ea51d24cc7d3bbfb8 /src/LineBlockTracer.cpp
parentFixed another redstone simulator crash (diff)
downloadcuberite-960fcaa90c3ba4d57ff2205259471799e0418d12.tar
cuberite-960fcaa90c3ba4d57ff2205259471799e0418d12.tar.gz
cuberite-960fcaa90c3ba4d57ff2205259471799e0418d12.tar.bz2
cuberite-960fcaa90c3ba4d57ff2205259471799e0418d12.tar.lz
cuberite-960fcaa90c3ba4d57ff2205259471799e0418d12.tar.xz
cuberite-960fcaa90c3ba4d57ff2205259471799e0418d12.tar.zst
cuberite-960fcaa90c3ba4d57ff2205259471799e0418d12.zip
Diffstat (limited to 'src/LineBlockTracer.cpp')
-rw-r--r--src/LineBlockTracer.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/LineBlockTracer.cpp b/src/LineBlockTracer.cpp
index b03652bab..2395aa43e 100644
--- a/src/LineBlockTracer.cpp
+++ b/src/LineBlockTracer.cpp
@@ -203,6 +203,15 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk)
m_Callbacks->OnNoChunk();
return false;
}
+
+ // Move to next block
+ if (!MoveToNextBlock())
+ {
+ // We've reached the end
+ m_Callbacks->OnNoMoreHits();
+ return true;
+ }
+
if (a_Chunk->IsValid())
{
BLOCKTYPE BlockType;
@@ -225,14 +234,6 @@ bool cLineBlockTracer::Item(cChunk * a_Chunk)
}
}
- // Move to next block
- if (!MoveToNextBlock())
- {
- // We've reached the end
- m_Callbacks->OnNoMoreHits();
- return true;
- }
-
// Update the current chunk
if (a_Chunk != NULL)
{