Skip to content

Commit

Permalink
Up to 0.9.5
Browse files Browse the repository at this point in the history
* Fix critical cache bug
  • Loading branch information
little-brother committed Oct 8, 2021
1 parent 4c39901 commit d81855d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ LRESULT CALLBACK cbNewMain(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
int* pCacheOffset = (int*)GetProp(hWnd, TEXT("CACHEOFFSET"));
TCHAR*** cache = (TCHAR***)GetProp(hWnd, TEXT("CACHE"));

if (pItem->iItem < *pCacheOffset || pItem->iItem > *pCacheOffset + CACHE_SIZE || *pCacheOffset == -1) {
if ((pItem->iItem < *pCacheOffset) || (pItem->iItem >= *pCacheOffset + CACHE_SIZE) || (*pCacheOffset == -1)) {
SendMessage(hWnd, WMU_RESET_CACHE, 0, 0);
*pCacheOffset = pItem->iItem;

Expand Down

0 comments on commit d81855d

Please sign in to comment.