diff --git a/Core/Libraries/Source/WWVegas/WW3D2/dynamesh.cpp b/Core/Libraries/Source/WWVegas/WW3D2/dynamesh.cpp index 654d3272bf..f8b3a17053 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/dynamesh.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/dynamesh.cpp @@ -587,9 +587,6 @@ DynamicMeshClass::DynamicMeshClass(const DynamicMeshClass & src) : MultiVertexMaterial[pass] = src.MultiVertexMaterial[pass]; VertexMaterialIdx[pass] = src.VertexMaterialIdx[pass]; - - MultiVertexColor[pass] = src.MultiVertexColor[pass]; - CurVertexColor[pass] = src.CurVertexColor[pass]; } for (int color_array_index = 0; color_array_index < MAX_COLOR_ARRAYS; color_array_index++) { diff --git a/Core/Libraries/Source/WWVegas/WWDownload/ftp.h b/Core/Libraries/Source/WWVegas/WWDownload/ftp.h index f9a1c81f46..fcb76e5316 100644 --- a/Core/Libraries/Source/WWVegas/WWDownload/ftp.h +++ b/Core/Libraries/Source/WWVegas/WWDownload/ftp.h @@ -67,7 +67,7 @@ class Cftp char m_szRemoteFilePath[128]; char m_szRemoteFileName[128]; char m_szLocalFilePath[128]; - char m_szLocalFileName[128]; + char m_szLocalFileName[256]; char m_szServerName[128]; char m_szUserName[128]; char m_szPassword[128]; diff --git a/Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp b/Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp index 7e68d12f0c..211ee88ebb 100644 --- a/Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp +++ b/Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp @@ -236,7 +236,7 @@ UnicodeString getUnicodeDateBuffer(SYSTEMTIME timeVal) DATE_SHORTDATE, &timeVal, NULL, - dateBuffer, sizeof(dateBuffer) ); + dateBuffer, ARRAY_SIZE(dateBuffer) ); displayDateBuffer.set(dateBuffer); return displayDateBuffer; //displayDateBuffer.format( L"%ls", dateBuffer ); @@ -270,7 +270,7 @@ UnicodeString getUnicodeTimeBuffer(SYSTEMTIME timeVal) &timeVal, NULL, timeBuffer, - sizeof(timeBuffer) ); + ARRAY_SIZE(timeBuffer) ); displayTimeBuffer.set(timeBuffer); return displayTimeBuffer; } diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp index 41bf4ea81e..5e4e17a3f4 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp @@ -288,7 +288,7 @@ void reallySaveReplay(void) if(DeleteFile(filename.str()) == 0) { wchar_t buffer[1024]; - FormatMessageW ( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, buffer, sizeof(buffer), NULL); + FormatMessageW ( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, buffer, ARRAY_SIZE(buffer), NULL); UnicodeString errorStr; errorStr.set(buffer); errorStr.trim(); @@ -313,7 +313,7 @@ void reallySaveReplay(void) if(CopyFile(oldFilename.str(),filename.str(), FALSE) == 0) { wchar_t buffer[1024]; - FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, buffer, sizeof(buffer), NULL); + FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, buffer, ARRAY_SIZE(buffer), NULL); UnicodeString errorStr; errorStr.set(buffer); errorStr.trim(); diff --git a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp index cc494c7755..ce62fc5fc6 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp @@ -672,7 +672,7 @@ void copyReplay( void ) if(CopyFile(filename.str(),newFilename.str(), FALSE) == 0) { wchar_t buffer[1024]; - FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, buffer, sizeof(buffer), NULL); + FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, buffer, ARRAY_SIZE(buffer), NULL); UnicodeString errorStr; errorStr.set(buffer); errorStr.trim(); diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DMouse.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DMouse.cpp index e6cf34f8ae..b5249abaf7 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DMouse.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DMouse.cpp @@ -235,9 +235,11 @@ void W3DMouse::initD3DAssets(void) for (Int j=0; j < MAX_2D_CURSOR_ANIM_FRAMES; j++) { cursorTextures[i][j]=NULL;//am->Get_Texture(m_cursorInfo[i].textureName.str()); - m_currentD3DSurface[i]=NULL; } } + + for (Int x = 0; x < MAX_2D_CURSOR_ANIM_FRAMES; x++) + m_currentD3DSurface[x]=NULL; } } diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp index e188774d1b..6128893f95 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp @@ -101,7 +101,7 @@ MaterialPassClass * RenderInfoClass::Peek_Additional_Pass(int i) void RenderInfoClass::Push_Override_Flags(RINFO_OVERRIDE_FLAGS flg) { // copy to the end of the array - WWASSERT(OverrideFlagLevelGet_Texture(m_cursorInfo[i].textureName.str()); - m_currentD3DSurface[i]=NULL; } } + + for (Int x = 0; x < MAX_2D_CURSOR_ANIM_FRAMES; x++) + m_currentD3DSurface[x]=NULL; } } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp index 609b9181a4..b0daaab30f 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/rinfo.cpp @@ -112,7 +112,7 @@ MaterialPassClass * RenderInfoClass::Peek_Additional_Pass(int i) void RenderInfoClass::Push_Override_Flags(RINFO_OVERRIDE_FLAGS flg) { // copy to the end of the array - WWASSERT(OverrideFlagLevel