summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/FastNBT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorldStorage/FastNBT.cpp')
-rw-r--r--src/WorldStorage/FastNBT.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/WorldStorage/FastNBT.cpp b/src/WorldStorage/FastNBT.cpp
index 99148e126..110bc68c8 100644
--- a/src/WorldStorage/FastNBT.cpp
+++ b/src/WorldStorage/FastNBT.cpp
@@ -143,10 +143,12 @@ std::error_code make_error_code(eNBTParseError a_Err) NOEXCEPT
// cParsedNBT:
#define NEEDBYTES(N, ERR) \
- if (m_Length - m_Pos < static_cast<size_t>(N)) \
- { \
- return ERR; \
- }
+ do { \
+ if (m_Length - m_Pos < static_cast<size_t>(N)) \
+ { \
+ return ERR; \
+ } \
+ } while (false)