Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/fceux.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeromus <zeromus@users.noreply.github.com>2022-08-21 22:35:45 +0300
committerzeromus <zeromus@users.noreply.github.com>2022-08-21 22:40:03 +0300
commit7806b24388291a15b5cda04531c23ed417339ab7 (patch)
tree78333f9d2e1b2525a27ed78dac177bfba31cda40
parent5230d2eacd5b64b0ebf2d6c1af3ee6edcc82d3a3 (diff)
winport - fix prefix checking on memwatch addresses (fixes #496)
-rw-r--r--src/drivers/win/window.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp
index b3f7d64b..3effd90d 100644
--- a/src/drivers/win/window.cpp
+++ b/src/drivers/win/window.cpp
@@ -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);
}