EM_REPLACESTR was not respecting buffer_limit.
diff --git a/controls/edit.c b/controls/edit.c
index 978914f..1ed12d9 100644
--- a/controls/edit.c
+++ b/controls/edit.c
@@ -1699,14 +1699,14 @@
{
HLOCAL hNew32W;
- if (size <= es->buffer_size)
- return TRUE;
-
if ((honor_limit) && (es->buffer_limit > 0) && (size > es->buffer_limit)) {
EDIT_NOTIFY_PARENT(es, EN_MAXTEXT, "EN_MAXTEXT");
return FALSE;
}
+ if (size <= es->buffer_size)
+ return TRUE;
+
TRACE("trying to ReAlloc to %d+1 characters\n", size);
/* Force edit to unlock it's buffer. es->text now NULL */