From f63190e3d4bb49c4d94c9f60754f051e1c93aaab Mon Sep 17 00:00:00 2001 From: ktkaufman03 Date: Wed, 5 Jul 2023 18:02:54 -0400 Subject: [PATCH] fix: MxPalette::SetSkyColor is 100% matching --- LEGO1/mxpalette.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LEGO1/mxpalette.cpp b/LEGO1/mxpalette.cpp index 8ed1a60a..a0157a5b 100644 --- a/LEGO1/mxpalette.cpp +++ b/LEGO1/mxpalette.cpp @@ -431,16 +431,16 @@ MxResult MxPalette::SetEntries(LPPALETTEENTRY p_entries) MxResult MxPalette::SetSkyColor(LPPALETTEENTRY p_sky_color) { MxResult status = 0; - LPDIRECTDRAWPALETTE palette = this->m_palette; - if ( palette ) + if ( this->m_palette != NULL ) { this->m_entries[141].peRed = p_sky_color->peRed; this->m_entries[141].peGreen = p_sky_color->peGreen; this->m_entries[141].peBlue = p_sky_color->peBlue; this->m_skyColor = this->m_entries[141]; - - if ( palette->SetEntries(0, 141, 1, &this->m_skyColor) ) + if ( this->m_palette->SetEntries(0, 141, 1, &this->m_skyColor) ) + { status = -1; + } } return status; }