diff --git a/source/glest_game/facilities/components.cpp b/source/glest_game/facilities/components.cpp index 8f414a63..9f148a53 100644 --- a/source/glest_game/facilities/components.cpp +++ b/source/glest_game/facilities/components.cpp @@ -45,6 +45,12 @@ GraphicComponent::GraphicComponent(std::string containerName, std::string objNam enabled = true; editable = true; visible = true; + x = 0; + y = 0; + w = 0; + h = 0; + text = ""; + font = NULL; } void GraphicComponent::clearRegisteredComponents(std::string containerName) { diff --git a/source/glest_game/global/core_data.cpp b/source/glest_game/global/core_data.cpp index 6bb20cad..fe3fdbb0 100644 --- a/source/glest_game/global/core_data.cpp +++ b/source/glest_game/global/core_data.cpp @@ -44,6 +44,9 @@ CoreData::~CoreData() { void CoreData::load() { string data_path = getGameReadWritePath(GameConstants::path_data_CacheLookupKey); + if(data_path != "") { + endPathWithSlash(data_path); + } const string dir = data_path + "data/core"; Logger::getInstance().add("Core data"); diff --git a/source/glest_game/world/map.cpp b/source/glest_game/world/map.cpp index 1a2e2476..a6199128 100644 --- a/source/glest_game/world/map.cpp +++ b/source/glest_game/world/map.cpp @@ -65,6 +65,7 @@ SurfaceCell::SurfaceCell() { normal= Vec3f(0.f, 1.f, 0.f); surfaceType= -1; surfaceTexture= NULL; + nearSubmerged = false; } SurfaceCell::~SurfaceCell() { diff --git a/source/shared_lib/sources/graphics/gl/texture_gl.cpp b/source/shared_lib/sources/graphics/gl/texture_gl.cpp index 9b499d03..38fa5979 100644 --- a/source/shared_lib/sources/graphics/gl/texture_gl.cpp +++ b/source/shared_lib/sources/graphics/gl/texture_gl.cpp @@ -655,7 +655,7 @@ TextureGl::~TextureGl() { // ===================================================== // class Texture1DGl // ===================================================== -Texture1DGl::Texture1DGl() {} +Texture1DGl::Texture1DGl() : TextureGl(), Texture1D() {} Texture1DGl::~Texture1DGl() { end(); @@ -748,7 +748,7 @@ void Texture1DGl::end(bool deletePixelBuffer) { // class Texture2DGl // ===================================================== -Texture2DGl::Texture2DGl() {} +Texture2DGl::Texture2DGl() : TextureGl(), Texture2D() {} Texture2DGl::~Texture2DGl() { end(); @@ -854,7 +854,7 @@ void Texture2DGl::end(bool deletePixelBuffer) { // class Texture3DGl // ===================================================== -Texture3DGl::Texture3DGl() {} +Texture3DGl::Texture3DGl() : TextureGl(), Texture3D() {} Texture3DGl::~Texture3DGl() { end(); @@ -929,7 +929,7 @@ void Texture3DGl::end(bool deletePixelBuffer) { // class TextureCubeGl // ===================================================== -TextureCubeGl::TextureCubeGl() {} +TextureCubeGl::TextureCubeGl() : TextureGl(), TextureCube() {} TextureCubeGl::~TextureCubeGl() { end(); diff --git a/source/shared_lib/sources/platform/miniupnpc/minixml.c b/source/shared_lib/sources/platform/miniupnpc/minixml.c index 83c6acd9..aee2f134 100644 --- a/source/shared_lib/sources/platform/miniupnpc/minixml.c +++ b/source/shared_lib/sources/platform/miniupnpc/minixml.c @@ -37,17 +37,18 @@ POSSIBILITY OF SUCH DAMAGE. * of the xmlbuffer is reached. */ static int parseatt(struct xmlparser * p) { - const char * attname; - int attnamelen; - const char * attvalue; - int attvaluelen; + const char * attname = 0; + int attnamelen = 0; + const char * attvalue = 0; + int attvaluelen = 0; + char sep = 0; while(p->xml < p->xmlend) { if(*p->xml=='/' || *p->xml=='>') return 0; if( !IS_WHITE_SPACE(*p->xml) ) { - char sep; + sep = 0; attname = p->xml; attnamelen = 0; while(*p->xml!='=' && !IS_WHITE_SPACE(*p->xml) ) @@ -108,8 +109,8 @@ static int parseatt(struct xmlparser * p) * call the callback functions when needed... */ static void parseelt(struct xmlparser * p) { - int i; - const char * elementname; + int i = 0; + const char * elementname = 0; while(p->xml < (p->xmlend - 1)) { if((p->xml)[0]=='<' && (p->xml)[1]!='?')