diff --git a/src/gl/renderer/gl_postprocess.cpp b/src/gl/renderer/gl_postprocess.cpp index cea7cbb3f0..7202ee2a91 100644 --- a/src/gl/renderer/gl_postprocess.cpp +++ b/src/gl/renderer/gl_postprocess.cpp @@ -938,7 +938,7 @@ int FGLRenderer::PTM_BestColor (const uint32_t *pal_in, int r, int g, int b, int static bool firstTime = true; static float trackpowtable = 0.; - double fbestdist, fdist; + double fbestdist = (double)(1<<53), fdist; int bestcolor = 0; if (firstTime || trackpowtable != gl_paltonemap_powtable) diff --git a/src/vectors.h b/src/vectors.h index 5fa0970f1f..95d7c5fdf7 100644 --- a/src/vectors.h +++ b/src/vectors.h @@ -651,6 +651,7 @@ struct TVector3 TVector3 &operator ^= (const TVector3 &other) { *this = *this ^ other; + return *this; } }; diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index d568ce60ff..63722a3719 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -1223,7 +1223,7 @@ void D3DFB::Flip() { RECT box; GetClientRect(Window, &box); - if (box.right > 0 && box.right > 0 && (Width != box.right || Height != box.bottom)) + if (box.right > 0 && (Width != box.right || Height != box.bottom)) { Resize(box.right, box.bottom);