G'day all,
Found the cause of my problems with Delphi programs and MaskEdit fields.
In an edit component which has a length set with EM_LIMITTEXT,
any text added with EM_REPLACESTR was not respecting the text length value.
This patch fixes it for me, can I have some feeback from someone in the
know please before I submit it to win-patches..
Watch the wrapping.. Mozilla is set to desecrate patches :p)
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
/ \