diff --git a/dlls/user/lstr.c b/dlls/user/lstr.c index 2d49ee1fc90..a25c600ed8d 100644 --- a/dlls/user/lstr.c +++ b/dlls/user/lstr.c @@ -236,7 +236,7 @@ LPSTR WINAPI CharPrevExA( WORD codepage, LPCSTR start, LPCSTR ptr, DWORD flags ) while (*start && (start < ptr)) { LPCSTR next = CharNextExA( codepage, start, flags ); - if (next > ptr) break; + if (next >= ptr) break; start = next; } return (LPSTR)start;