Fix Maskedit from Delphi - part 2 - correct fix ?

Brad Campbell brad at seme.com.au
Tue Apr 22 21:25:54 CDT 2003


Alexandre Julliard wrote:
> Brad Campbell <brad at seme.com.au> writes:
> 
> 
>>     EM_REPLACESTR was not respecting buffer_limit set
>>     by EM_SETLIMITTEXT.
> 
> 
> Shouldn't the EDIT_MakeFit() call a few lines above already take care
> of that?  Why doesn't it work?
Yes it should. This fixes it.
Thanks for the idiot check :p)


-- 
Brad....
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X      AGAINST HTML MAIL
  / \
-------------- next part --------------
Index: controls/edit.c
===================================================================
RCS file: /home/wine/wine/controls/edit.c,v
retrieving revision 1.110
diff -u -r1.110 edit.c
--- controls/edit.c	27 Feb 2003 21:09:46 -0000	1.110
+++ controls/edit.c	23 Apr 2003 02:24:07 -0000
@@ -1699,13 +1699,13 @@
 {
 	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);
 


More information about the wine-devel mailing list