winport - fix prefix checking on memwatch addresses (fixes #496)

This commit is contained in:
zeromus 2022-08-21 15:35:45 -04:00
parent 5230d2eacd
commit 7806b24388
1 changed files with 3 additions and 2 deletions

View File

@ -3523,9 +3523,10 @@ LRESULT APIENTRY FilterEditCtrlProc(HWND hwnd, UINT msg, WPARAM wP, LPARAM lP)
case WM_CHAR:
{
int len = GetWindowTextLength(hwnd);
DWORD cpBegin, cpEnd;
SendMessage(hwnd, EM_GETSEL, (LPARAM)&cpBegin, (LPARAM)&cpEnd);
IsLetterLegalProc isLetterLegal = GetIsLetterLegalProc(GetDlgCtrlID(hwnd));
through = IsInputLegal(isLetterLegal, len, wP);
through = IsInputLegal(isLetterLegal, (int)cpBegin, wP);
if (!through)
ShowLetterIllegalBalloonTip(hwnd, isLetterLegal);
}