Skip to content

Commit af972d5

Browse files
fix
1 parent 71065aa commit af972d5

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

DotAAllstarsHelperFinal/DotaClickHelper.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3718,7 +3718,8 @@ LRESULT __fastcall WarcraftWindowProcHooked(HWND hWnd, unsigned int _Msg, WPARAM
37183718

37193719
if (!ClickHelperWork && DoubleClickHelper)
37203720
{
3721-
if (GetTickCount() - LastPressedKeysTime[wParam] < 450 && ((wParam == LatestPressedKey && LatestButtonClickTime + 500 > GetTickCount()) || wParam != LatestPressedKey))
3721+
if (GetTickCount() - LastPressedKeysTime[wParam] < 450 &&
3722+
((wParam == LatestPressedKey && LatestButtonClickTime + 500 > GetTickCount()) || (wParam != LatestPressedKey)) )
37223723
{
37233724
itempressed = itempressed || (wParam >= VK_NUMPAD1 && wParam <= VK_NUMPAD8);
37243725

DotAAllstarsHelperFinal/StackWalker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,12 +829,12 @@ class StackWalkerInternal
829829

830830
BOOL GetModuleInfo(HANDLE hProcess, DWORD64 baseAddr, IMAGEHLP_MODULE64_V3* pModuleInfo)
831831
{
832-
memset(pModuleInfo, 0, sizeof(IMAGEHLP_MODULE64_V3));
833-
if (this->pSGMI == NULL)
832+
if (!pModuleInfo || this->pSGMI == NULL)
834833
{
835834
SetLastError(ERROR_DLL_INIT_FAILED);
836835
return FALSE;
837836
}
837+
memset(pModuleInfo, 0, sizeof(IMAGEHLP_MODULE64_V3));
838838
// First try to use the larger ModuleInfo-Structure
839839
pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULE64_V3);
840840
void* pData = malloc(

DotAAllstarsHelperFinal/quantizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CQuantizer::CQuantizer(unsigned int nMaxColors, unsigned int nColorBits)
2222
m_nLeafCount = 0;
2323
m_lastIndex = 0;
2424
m_needsAlpha = false;
25-
for (int i = 0; i <= (int)m_nColorBits; i++)
25+
for (int i = 0; i <= (int)m_nColorBits && i < 8; i++)
2626
m_pReducibleNodes[i] = 0;
2727
m_nMaxColors = m_nOutputMaxColors = nMaxColors;
2828
if (m_nMaxColors < 16)m_nMaxColors = 16;

0 commit comments

Comments
 (0)