Fix Maskedit from Delphi - part 2

Brad Campbell brad at seme.com.au
Mon Apr 7 03:20:18 CDT 2003


changelog:
	EM_REPLACESTR was not respecting buffer_limit set
	by EM_SETLIMITTEXT.

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     6 Apr 2003 16:04:41 -0000
@@ -2945,6 +2945,10 @@
                 } else
                         EDIT_EM_EmptyUndoBuffer(es);

+               /* respect buffer_limit */
+               if ((s+strl) > es->buffer_limit)
+                       strl = (es->buffer_limit-s);
+
                 /* now insert */
                 tl = strlenW(es->text);
                 TRACE("inserting stuff (tl %d, strl %d, selstart %d 
('%s'), text '%s')\n", tl, strl, s, debugstr_w(es->text + s), 
debugstr_w(es->text));

-- 
Brad....
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X      AGAINST HTML MAIL
  / \




More information about the wine-patches mailing list