diff options
author | Bond-009 <bond.009@outlook.com> | 2019-08-11 11:39:43 +0200 |
---|---|---|
committer | peterbell10 <peterbell10@live.co.uk> | 2019-08-11 11:39:43 +0200 |
commit | e0ca4d83991d80865781c1dbbbfa1f92259a366a (patch) | |
tree | 7a1ee18692772befe2c60bd304474fae99d51e1b /src/WorldStorage/FastNBT.cpp | |
parent | Wake up redstone simulator on slot changes for blockentities (#4348) (diff) | |
download | cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.gz cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.bz2 cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.lz cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.xz cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.tar.zst cuberite-e0ca4d83991d80865781c1dbbbfa1f92259a366a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/WorldStorage/FastNBT.cpp | 10 |
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) |