remove ZeroMemory macro

This commit is contained in:
Tropical 2026-04-01 00:47:10 -05:00
parent b4feb6ce92
commit f047de62e2
25 changed files with 57 additions and 60 deletions

View file

@ -143,11 +143,11 @@ CMinecraftApp::CMinecraftApp() {
m_bDebugOptions = false;
#endif
// ZeroMemory(m_PreviewBuffer,sizeof(XSOCIAL_PREVIEWIMAGE)*XUSER_MAX_COUNT);
// memset(m_PreviewBuffer, 0, sizeof(XSOCIAL_PREVIEWIMAGE)*XUSER_MAX_COUNT);
m_xuidNotch = INVALID_XUID;
ZeroMemory(&m_InviteData, sizeof(JoinFromInviteData));
memset(&m_InviteData, 0, sizeof(JoinFromInviteData));
// m_bRead_TMS_XUIDS_XML=false;
// m_bRead_TMS_DLCINFO_XML=false;
@ -164,7 +164,7 @@ CMinecraftApp::CMinecraftApp() {
m_iTotalDLCInstalled = 0;
mfTrialPausedTime = 0.0f;
m_uiAutosaveTimer = 0;
ZeroMemory(m_pszUniqueMapName, 14);
memset(m_pszUniqueMapName, 0, 14);
m_bNewDLCAvailable = false;
m_bSeenNewDLCTip = false;
@ -177,7 +177,7 @@ CMinecraftApp::CMinecraftApp() {
m_GameNewHellScale = 0;
#endif
ZeroMemory(m_playerColours, MINECRAFT_NET_MAX_PLAYERS);
memset(m_playerColours, 0, MINECRAFT_NET_MAX_PLAYERS);
m_iDLCOfferC = 0;
m_bAllDLCContentRetrieved = true;
@ -4816,7 +4816,7 @@ int CMinecraftApp::TipsSortFunction(const void* a, const void* b) {
void CMinecraftApp::InitialiseTips() {
// We'll randomise the tips at start up based on their priority
ZeroMemory(m_TipIDA, sizeof(m_TipIDA));
memset(m_TipIDA, 0, sizeof(m_TipIDA));
// Make the first tip tell you that you can play splitscreen in HD modes if
// you are in SD
@ -5261,7 +5261,7 @@ int32_t CMinecraftApp::RegisterMojangData(wchar_t* pXuidName, PlayerUID xuid,
if (eTempXuid != eXUID_Undefined) {
pMojangData = new MOJANG_DATA;
ZeroMemory(pMojangData, sizeof(MOJANG_DATA));
memset(pMojangData, 0, sizeof(MOJANG_DATA));
pMojangData->eXuid = eTempXuid;
wcsncpy(pMojangData->wchSkin, pSkin, MAX_CAPENAME_SIZE);
@ -5313,7 +5313,7 @@ int32_t CMinecraftApp::RegisterDLCData(wchar_t* pType, wchar_t* pBannerName,
wchar_t* pDataFile) {
int32_t hr = 0;
DLC_INFO* pDLCData = new DLC_INFO;
ZeroMemory(pDLCData, sizeof(DLC_INFO));
memset(pDLCData, 0, sizeof(DLC_INFO));
pDLCData->ullOfferID_Full = ullOfferID_Full;
pDLCData->ullOfferID_Trial = ullOfferID_Trial;
pDLCData->eDLCType = e_DLC_NotDefined;
@ -5375,7 +5375,7 @@ int32_t CMinecraftApp::RegisterDLCData(char* pchDLCName,
char chDLCType[3];
int32_t hr = 0;
DLC_INFO* pDLCData = new DLC_INFO;
ZeroMemory(pDLCData, sizeof(DLC_INFO));
memset(pDLCData, 0, sizeof(DLC_INFO));
chDLCType[0] = pchDLCName[0];
chDLCType[1] = pchDLCName[1];
@ -6203,7 +6203,7 @@ void CMinecraftApp::GetImageTextData(std::uint8_t* imageData,
// check that it's the 4J text
unsigned char* pszKeyword = &ucPtr[uiCount];
while (pszKeyword < ucPtr + uiCount + uiChunkLen) {
ZeroMemory(szKeyword, 80);
memset(szKeyword, 0, 80);
unsigned int uiKeywordC = 0;
while (*pszKeyword != 0) {
szKeyword[uiKeywordC++] = *pszKeyword;
@ -6225,7 +6225,7 @@ void CMinecraftApp::GetImageTextData(std::uint8_t* imageData,
unsigned int uiValueC = 0;
unsigned char pszHostOptions[9]; // Hex representation of
// unsigned int
ZeroMemory(&pszHostOptions, 9);
memset(&pszHostOptions, 0, 9);
while (*pszKeyword != 0 &&
(pszKeyword < ucPtr + uiCount + uiChunkLen) &&
uiValueC < 8) {
@ -6242,7 +6242,7 @@ void CMinecraftApp::GetImageTextData(std::uint8_t* imageData,
unsigned int uiValueC = 0;
unsigned char pszTexturePack[9]; // Hex representation of
// unsigned int
ZeroMemory(&pszTexturePack, 9);
memset(&pszTexturePack, 0, 9);
while (*pszKeyword != 0 &&
(pszKeyword < ucPtr + uiCount + uiChunkLen) &&
uiValueC < 8) {
@ -6653,7 +6653,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType,
// app.DebugPrintf("Adding a request to the TMSPP
// download queue - %ls\n",pDLC->wchBanner);
TMSPPRequest* pTMSPPreq = new TMSPPRequest;
ZeroMemory(pTMSPPreq, sizeof(TMSPPRequest));
memset(pTMSPPreq, 0, sizeof(TMSPPRequest));
pTMSPPreq->CallbackFunc =
&CMinecraftApp::TMSPPFileReturned;

View file

@ -107,7 +107,7 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type,
case DLCManager::e_DLCParamType_Box: {
wchar_t wchBodyPart[10];
SKIN_BOX* pSkinBox = new SKIN_BOX;
ZeroMemory(pSkinBox, sizeof(SKIN_BOX));
memset(pSkinBox, 0, sizeof(SKIN_BOX));
swscanf_s(value.c_str(), L"%9ls%f%f%f%f%f%f%f%f", wchBodyPart, 10,
&pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ,

View file

@ -54,7 +54,7 @@ public:
Compression::ECompressionTypes compressionType;
_XboxSchematicInitParam() {
ZeroMemory(name, 64 * (sizeof(wchar_t)));
memset(name, 0, 64 * (sizeof(wchar_t)));
startX = startY = startZ = endX = endY = endZ = 0;
bSaveMobs = false;
compressionType = Compression::eCompressionType_None;

View file

@ -451,7 +451,7 @@ std::wstring CPlatformNetworkManagerStub::GatherRTTStats() {
((NetworkPlayerQNet*)GetPlayerByIndex(i))->GetQNetPlayer();
if (!pQNetPlayer->IsLocal()) {
ZeroMemory(stat, 32 * sizeof(wchar_t));
memset(stat, 0, 32 * sizeof(wchar_t));
swprintf(stat, 32, L"%d: %d/", i, pQNetPlayer->GetCurrentRtt());
stats.append(stat);
}

View file

@ -599,7 +599,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(
LeaderboardEntry* leaderboardEntry =
&(m_leaderboard.m_entries[leaderboardEntryIndex]);
ZeroMemory(leaderboardEntry, sizeof(LeaderboardEntry));
memset(leaderboardEntry, 0, sizeof(LeaderboardEntry));
leaderboardEntry->m_xuid = statsRow->m_uid;
// Copy the rank
@ -635,7 +635,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry(
// Copy the other columns
for (unsigned int i = 0; i < statsRow->m_statsSize; i++) {
leaderboardEntry->m_columns[i] = statsRow->m_statsData[i];
ZeroMemory(leaderboardEntry->m_wcColumns[i], 12 * sizeof(wchar_t));
memset(leaderboardEntry->m_wcColumns[i], 0, 12 * sizeof(wchar_t));
if (!isDistanceLeaderboard) {
unsigned int displayValue = leaderboardEntry->m_columns[i];
if (displayValue > 99999) displayValue = 99999;

View file

@ -270,7 +270,7 @@ void UIScene_LoadMenu::tick() {
unsigned int uiHostOptions = 0;
char szSeed[50];
ZeroMemory(szSeed, 50);
memset(szSeed, 0, 50);
app.GetImageTextData(
m_pbThumbnailData, m_uiThumbnailSize, (unsigned char*)&szSeed,
uiHostOptions, bHostOptionsRead, m_MoreOptionsParams.dwTexturePack);

View file

@ -1099,7 +1099,7 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList() {
}
SessionID selectedSessionId;
ZeroMemory(&selectedSessionId, sizeof(SessionID));
memset(&selectedSessionId, 0, sizeof(SessionID));
if (pSelectedSession != nullptr)
selectedSessionId = pSelectedSession->sessionId;
pSelectedSession = nullptr;
@ -1476,7 +1476,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(
// bring up a keyboard
wchar_t wSaveName[128];
// CD - Fix - We must memset the SaveName
ZeroMemory(wSaveName, 128 * sizeof(wchar_t));
memset(wSaveName, 0, 128 * sizeof(wchar_t));
mbstowcs(
wSaveName,
pClass
@ -1722,7 +1722,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) {
// on saving games that
std::uint8_t bTextMetadata[88];
ZeroMemory(bTextMetadata, 88);
memset(bTextMetadata, 0, 88);
unsigned int hostOptions =
app.getRemoteStorage()->getSaveHostOptions();
int iTextMetadataBytes = app.CreateImageTextData(
@ -1898,7 +1898,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) {
// for use on saving games that
std::uint8_t bTextMetadata[88];
ZeroMemory(bTextMetadata, 88);
memset(bTextMetadata, 0, 88);
unsigned int remoteHostOptions =
app.getRemoteStorage()->getSaveHostOptions();
app.SetGameHostOption(eGameHostOption_All,

View file

@ -237,7 +237,7 @@ void UIScene_Credits::tick() {
wchar_t* creditsString = new wchar_t[128];
if (pDef->m_iStringID[0] == NO_TRANSLATED_STRING) {
ZeroMemory(creditsString, 128);
memset(creditsString, 0, 128);
memcpy(creditsString, sanitisedString.c_str(),
sizeof(wchar_t) * sanitisedString.length());
} else if (pDef->m_iStringID[1] != NO_TRANSLATED_STRING) {

View file

@ -235,7 +235,7 @@ void UIScene_EndPoem::updateNoise() {
colour = eHTMLColor_9;
else if (randomVal == 2)
colour = eHTMLColor_a;
ZeroMemory(replacements, 64 * sizeof(wchar_t));
memset(replacements, 0, 64 * sizeof(wchar_t));
swprintf(
replacements, 64,
L"<font color=\"#%08x\" shadowcolor=\"#80000000\">%ls</font>",

View file

@ -547,7 +547,7 @@ int32_t InitDevice() {
uint32_t numFeatureLevels = ARRAYSIZE(featureLevels);
DXGI_SWAP_CHAIN_DESC sd;
ZeroMemory(&sd, sizeof(sd));
memset(&sd, 0, sizeof(sd));
sd.BufferCount = 1;
sd.BufferDesc.Width = width;
sd.BufferDesc.Height = height;

View file

@ -14,9 +14,6 @@
#include <sys/stat.h>
#include <sys/time.h>
#define RtlZeroMemory(Destination, Length) memset((Destination), 0, (Length))
#define ZeroMemory RtlZeroMemory
#define __cdecl
#define _vsnprintf_s vsnprintf;

View file

@ -88,7 +88,7 @@ BufferedImage::BufferedImage(const std::wstring& File,
}
D3DXIMAGE_INFO ImageInfo;
ZeroMemory(&ImageInfo, sizeof(D3DXIMAGE_INFO));
memset(&ImageInfo, 0, sizeof(D3DXIMAGE_INFO));
if (foundOnDisk) {
hr = RenderManager.LoadTextureData(wstringtofilename(finalPath),
@ -164,7 +164,7 @@ BufferedImage::BufferedImage(std::uint8_t* pbData, std::uint32_t dataBytes) {
}
D3DXIMAGE_INFO ImageInfo;
ZeroMemory(&ImageInfo, sizeof(D3DXIMAGE_INFO));
memset(&ImageInfo, 0, sizeof(D3DXIMAGE_INFO));
int32_t hr =
RenderManager.LoadTextureData(pbData, dataBytes, &ImageInfo, &data[0]);

View file

@ -564,7 +564,7 @@ int32_t InitDevice() {
uint32_t numFeatureLevels = ARRAYSIZE(featureLevels);
DXGI_SWAP_CHAIN_DESC sd;
ZeroMemory(&sd, sizeof(sd));
memset(&sd, 0, sizeof(sd));
sd.BufferCount = 1;
sd.BufferDesc.Width = width;
sd.BufferDesc.Height = height;

View file

@ -38,7 +38,7 @@ public:
pAttributes[i].ValueLen);
} else if (_wcsicmp(wAttName, L"xuid") == 0) {
if (pAttributes[i].ValueLen <= 32) {
ZeroMemory(wTemp, sizeof(wchar_t) * 35);
memset(wTemp, 0, sizeof(wchar_t) * 35);
wcsncpy_s(wTemp, pAttributes[i].strValue,
pAttributes[i].ValueLen);
xuid = _wcstoui64(wTemp, nullptr, 10);
@ -203,7 +203,7 @@ public:
pAttributes[i].NameLen);
if (_wcsicmp(wAttName, L"SortIndex") == 0) {
if (pAttributes[i].ValueLen <= 32) {
ZeroMemory(wTemp, sizeof(wchar_t) * 35);
memset(wTemp, 0, sizeof(wchar_t) * 35);
wcsncpy_s(wTemp, pAttributes[i].strValue,
pAttributes[i].ValueLen);
uiSortIndex = wcstoul(wTemp, nullptr, 16);
@ -215,14 +215,14 @@ public:
}
} else if (_wcsicmp(wAttName, L"Full") == 0) {
if (pAttributes[i].ValueLen <= 32) {
ZeroMemory(wTemp, sizeof(wchar_t) * 35);
memset(wTemp, 0, sizeof(wchar_t) * 35);
wcsncpy_s(wTemp, pAttributes[i].strValue,
pAttributes[i].ValueLen);
ullFull = _wcstoui64(wTemp, nullptr, 16);
}
} else if (_wcsicmp(wAttName, L"Trial") == 0) {
if (pAttributes[i].ValueLen <= 32) {
ZeroMemory(wTemp, sizeof(wchar_t) * 35);
memset(wTemp, 0, sizeof(wchar_t) * 35);
wcsncpy_s(wTemp, pAttributes[i].strValue,
pAttributes[i].ValueLen);
ullTrial = _wcstoui64(wTemp, nullptr, 16);

View file

@ -252,7 +252,7 @@ void Minimap::render(std::shared_ptr<Player> player, Textures* textures,
// DCR: Render the players current position here instead
if (player != nullptr) {
wchar_t playerPosText[32];
ZeroMemory(&playerPosText, sizeof(wchar_t) * 32);
memset(&playerPosText, 0, sizeof(wchar_t) * 32);
int posx = floor(player->x);
int posy = floor(player->y);
int posz = floor(player->z);

View file

@ -99,7 +99,7 @@ void PlayerList::placeNewPlayer(Connection* connection,
std::uint8_t playerIndex = 0;
{
bool usedIndexes[MINECRAFT_NET_MAX_PLAYERS];
ZeroMemory(&usedIndexes, MINECRAFT_NET_MAX_PLAYERS * sizeof(bool));
memset(&usedIndexes, 0, MINECRAFT_NET_MAX_PLAYERS * sizeof(bool));
for (auto it = players.begin(); it < players.end(); ++it) {
usedIndexes[(int)(*it)->getPlayerIndex()] = true;
}

View file

@ -505,7 +505,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
// 4J Stu - Saves created between 2/12/2011 and 7/12/2011 will
// have this problem
app.DebugPrintf("Invalid save data format\n");
ZeroMemory(pvSaveMem, fileSize);
memset(pvSaveMem, 0, fileSize);
// Clear the first 8 bytes that reference the header
header.WriteHeader(pvSaveMem);
} else {
@ -542,7 +542,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
#endif
ZeroMemory(pvSaveMem, fileSize);
memset(pvSaveMem, 0, fileSize);
// Clear the first 8 bytes that reference the header
header.WriteHeader(pvSaveMem);
}
@ -1347,7 +1347,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();
ZeroMemory(compData, 8);
memset(compData, 0, 8);
int saveVer = 0;
memcpy(compData, &saveVer, sizeof(int));
memcpy(compData + 4, &fileSize, sizeof(int));
@ -1363,7 +1363,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
unsigned int dwDataSizeSaveImage = 0;
std::uint8_t bTextMetadata[88];
ZeroMemory(bTextMetadata, 88);
memset(bTextMetadata, 0, 88);
int64_t seed = 0;
bool hasSeed = false;

View file

@ -16,7 +16,7 @@ PreLoginPacket::PreLoginPacket() {
m_dwPlayerCount = 0;
m_friendsOnlyBits = 0;
m_ugcPlayersVersion = 0;
ZeroMemory(m_szUniqueSaveName, m_iSaveNameLen);
memset(m_szUniqueSaveName, 0, m_iSaveNameLen);
m_serverSettings = 0;
m_hostIndex = 0;
m_texturePackId = 0;
@ -29,7 +29,7 @@ PreLoginPacket::PreLoginPacket(std::wstring userName) {
m_dwPlayerCount = 0;
m_friendsOnlyBits = 0;
m_ugcPlayersVersion = 0;
ZeroMemory(m_szUniqueSaveName, m_iSaveNameLen);
memset(m_szUniqueSaveName, 0, m_iSaveNameLen);
m_serverSettings = 0;
m_hostIndex = 0;
m_texturePackId = 0;

View file

@ -39,7 +39,7 @@ AttributeModifier* EnderMan::SPEED_MODIFIER_ATTACKING =
bool EnderMan::MAY_TAKE[256];
void EnderMan::staticCtor() {
ZeroMemory(MAY_TAKE, sizeof(bool) * 256);
memset(MAY_TAKE, 0, sizeof(bool) * 256);
MAY_TAKE[Tile::grass_Id] = true;
MAY_TAKE[Tile::dirt_Id] = true;
MAY_TAKE[Tile::sand_Id] = true;

View file

@ -148,10 +148,10 @@ void ArmorDyeRecipe::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
TempIngReq.iIngValA = new int[3 * 3];
TempIngReq.iIngAuxValA = new int[3 * 3];
ZeroMemory(TempIngReq.iIngIDA, sizeof(int) * 9);
ZeroMemory(TempIngReq.iIngValA, sizeof(int) * 9);
memset(TempIngReq.iIngIDA, 0, sizeof(int) * 9);
memset(TempIngReq.iIngValA, 0, sizeof(int) * 9);
memset(TempIngReq.iIngAuxValA, Recipes::ANY_AUX_VALUE, sizeof(int) * 9);
ZeroMemory(TempIngReq.uiGridA, sizeof(unsigned int) * 9);
memset(TempIngReq.uiGridA, 0, sizeof(unsigned int) * 9);
pIngReq->iIngIDA = new int[TempIngReq.iIngC];
pIngReq->iIngValA = new int[TempIngReq.iIngC];

View file

@ -129,10 +129,10 @@ void ShapedRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
TempIngReq.iIngValA = new int[9];
TempIngReq.iIngAuxValA = new int[9];
ZeroMemory(TempIngReq.iIngIDA, sizeof(int) * 9);
ZeroMemory(TempIngReq.iIngValA, sizeof(int) * 9);
memset(TempIngReq.iIngIDA, 0, sizeof(int) * 9);
memset(TempIngReq.iIngValA, 0, sizeof(int) * 9);
memset(TempIngReq.iIngAuxValA, Recipes::ANY_AUX_VALUE, sizeof(int) * 9);
ZeroMemory(TempIngReq.uiGridA, sizeof(unsigned int) * 9);
memset(TempIngReq.uiGridA, 0, sizeof(unsigned int) * 9);
for (int x = 0; x < 3; x++) {
for (int y = 0; y < 3; y++) {

View file

@ -106,10 +106,10 @@ void ShapelessRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) {
TempIngReq.iIngValA = new int[3 * 3];
TempIngReq.iIngAuxValA = new int[3 * 3];
ZeroMemory(TempIngReq.iIngIDA, sizeof(int) * 9);
ZeroMemory(TempIngReq.iIngValA, sizeof(int) * 9);
memset(TempIngReq.iIngIDA, 0, sizeof(int) * 9);
memset(TempIngReq.iIngValA, 0, sizeof(int) * 9);
memset(TempIngReq.iIngAuxValA, Recipes::ANY_AUX_VALUE, sizeof(int) * 9);
ZeroMemory(TempIngReq.uiGridA, sizeof(unsigned int) * 9);
memset(TempIngReq.uiGridA, 0, sizeof(unsigned int) * 9);
auto citEnd = ingredients->end();

View file

@ -67,7 +67,7 @@ RegionFile::RegionFile(ConsoleSaveFile* saveFile, File* path) {
unsigned int numberOfBytesWritten = 0;
unsigned int bytesToWrite = 0x1000 - (fileEntry->getFileSize() & 0xfff);
std::uint8_t* zeroBytes = new std::uint8_t[bytesToWrite];
ZeroMemory(zeroBytes, bytesToWrite);
memset(zeroBytes, 0, bytesToWrite);
/* the file size is not a multiple of 4KB, grow it */
m_saveFile->writeFile(fileEntry, zeroBytes, bytesToWrite,
@ -455,7 +455,7 @@ void RegionFile::insertInitialSectors() {
m_saveFile->setFilePointer(fileEntry, 0, SaveFileSeekOrigin::Begin);
unsigned int numberOfBytesWritten = 0;
std::uint8_t zeroBytes[SECTOR_BYTES];
ZeroMemory(zeroBytes, SECTOR_BYTES);
memset(zeroBytes, 0, SECTOR_BYTES);
/* we need to write the chunk offset table */
m_saveFile->writeFile(fileEntry, zeroBytes, SECTOR_BYTES,

View file

@ -43,8 +43,8 @@
const std::wstring DirectoryLevelStorage::sc_szPlayerDir(L"players/");
_MapDataMappings::_MapDataMappings() {
ZeroMemory(xuids, sizeof(PlayerUID) * MAXIMUM_MAP_SAVE_DATA);
ZeroMemory(dimensions, sizeof(uint8_t) * (MAXIMUM_MAP_SAVE_DATA / 4));
memset(xuids, 0, sizeof(PlayerUID) * MAXIMUM_MAP_SAVE_DATA);
memset(dimensions, 0, sizeof(uint8_t) * (MAXIMUM_MAP_SAVE_DATA / 4));
}
int _MapDataMappings::getDimension(int id) {
@ -102,8 +102,8 @@ void _MapDataMappings::setMapping(int id, PlayerUID xuid, int dimension) {
// Old version the only used 1 bit for dimension indexing
_MapDataMappings_old::_MapDataMappings_old() {
ZeroMemory(xuids, sizeof(PlayerUID) * MAXIMUM_MAP_SAVE_DATA);
ZeroMemory(dimensions, sizeof(uint8_t) * (MAXIMUM_MAP_SAVE_DATA / 8));
memset(xuids, 0, sizeof(PlayerUID) * MAXIMUM_MAP_SAVE_DATA);
memset(dimensions, 0, sizeof(uint8_t) * (MAXIMUM_MAP_SAVE_DATA / 8));
}
int _MapDataMappings_old::getDimension(int id) {

View file

@ -111,7 +111,7 @@ void SignTileEntity::setChanged() {
for (int i = 0; i < MAX_SIGN_LINES; ++i)
{
wcMessages[i]=new wchar_t [MAX_LINE_LENGTH+1];
ZeroMemory(wcMessages[i],sizeof(wchar_t)*(MAX_LINE_LENGTH+1));
memset(wcMessages[i], 0, sizeof(wchar_t)*(MAX_LINE_LENGTH+1));
if(m_wsmessages[i].length()>0)
{
memcpy(wcMessages[i],m_wsmessages[i].c_str(),m_wsmessages[i].length()*sizeof(wchar_t));