From 65c89f052be556aa4a344a75695f2b2634457a8a Mon Sep 17 00:00:00 2001 From: Benjamin Mintz Date: Wed, 9 Dec 2015 23:12:05 -0600 Subject: Put the entire compile.sh script in a code block for security This makes sure that sh will error out if the connection is interrupted. See here: https://www.seancassidy.me/dont-pipe-to-your-shell.html --- compile.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compile.sh b/compile.sh index e5a164603..1bd8a4870 100755 --- a/compile.sh +++ b/compile.sh @@ -1,5 +1,6 @@ #!/bin/sh #|| goto :windows_detected +{ # put the whole thing in a block so as not to behave weirdly if interrupted set -e # Do we already have a repo? @@ -206,3 +207,4 @@ exit 0 echo "This script is not available for Windows yet, sorry." echo "You can still download the Windows binaries from: http://cuberite.org" echo "You can also manually compile for Windows. See: https://github.com/cuberite/cuberite" +} -- cgit v1.2.3 From 56e7329f297cd8852e344bfebc5761fd4183ed79 Mon Sep 17 00:00:00 2001 From: Gargaj Date: Thu, 10 Dec 2015 20:41:51 +0100 Subject: Test for correct coordinates when fishing Fun fact: this was able to actually deadlock the server depending on where you were standing :) --- src/Entities/Floater.cpp | 2 +- src/WorldStorage/NBTChunkSerializer.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp index 29d59e6c4..0b96f12df 100644 --- a/src/Entities/Floater.cpp +++ b/src/Entities/Floater.cpp @@ -155,7 +155,7 @@ void cFloater::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) } m_CountDownTime--; - if (m_World->GetHeight(POSX_TOINT, POSY_TOINT) == POSZ_TOINT) + if (m_World->GetHeight(POSX_TOINT, POSZ_TOINT) == POSY_TOINT) { if (m_World->IsWeatherWet() && m_World->GetTickRandomNumber(3) == 0) // 25% chance of an extra countdown when being rained on. { diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp index 855fcea09..b0451e427 100644 --- a/src/WorldStorage/NBTChunkSerializer.cpp +++ b/src/WorldStorage/NBTChunkSerializer.cpp @@ -922,6 +922,7 @@ void cNBTChunkSerializer::Entity(cEntity * a_Entity) case cEntity::etItemFrame: AddItemFrameEntity (reinterpret_cast (a_Entity)); break; case cEntity::etPainting: AddPaintingEntity (reinterpret_cast (a_Entity)); break; case cEntity::etPlayer: return; // Players aren't saved into the world + case cEntity::etFloater: return; // Floaters aren't saved either default: { ASSERT(!"Unhandled entity type is being saved"); -- cgit v1.2.3