mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-31 10:02:59 +00:00
fix: SIOF crash in ChatScreen/TextEditScreen, RemoveEntitiesPacket MAX_PER_PACKET on linux
This commit is contained in:
parent
3a9af73c63
commit
d0e7106cdf
|
|
@ -4,7 +4,7 @@
|
|||
#include "../../../Minecraft.World/Util/SharedConstants.h"
|
||||
#include "../../../Minecraft.World/Util/StringHelpers.h"
|
||||
|
||||
const wstring ChatScreen::allowedChars = SharedConstants::acceptableLetters;
|
||||
const wstring ChatScreen::allowedChars = SharedConstants::readAcceptableChars();
|
||||
|
||||
ChatScreen::ChatScreen()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
#include "../../../Minecraft.World/Headers/net.minecraft.world.level.tile.h"
|
||||
|
||||
|
||||
const wstring TextEditScreen::allowedChars = SharedConstants::acceptableLetters;;
|
||||
const wstring TextEditScreen::allowedChars = SharedConstants::readAcceptableChars();
|
||||
|
||||
TextEditScreen::TextEditScreen(shared_ptr<SignTileEntity> sign)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,6 +51,6 @@ int RemoveEntitiesPacket::getEstimatedSize()
|
|||
4J: These are necesary on the PS3.
|
||||
(and 4).
|
||||
*/
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__)
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || defined __linux__)
|
||||
const int RemoveEntitiesPacket::MAX_PER_PACKET;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ bool SharedConstants::isAllowedChatCharacter(char ch)
|
|||
return true;
|
||||
}
|
||||
|
||||
wstring SharedConstants::acceptableLetters;
|
||||
wstring SharedConstants::acceptableLetters = SharedConstants::readAcceptableChars();
|
||||
|
||||
void SharedConstants::staticCtor()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ class SharedConstants
|
|||
static const int WORLD_RESOLUTION = 16;
|
||||
|
||||
static bool isAllowedChatCharacter(char ch);
|
||||
|
||||
private:
|
||||
// why private??????????
|
||||
static wstring readAcceptableChars();
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in a new issue