Text handling broke.
dmitry at news.sloboda.ru
Tue Feb 6 05:33:02 CST 2001
"gerard patel" <nomailthankyoug.patel at wanadoo.fr> wrote:
> >Not at all. Application has passed buffer length in the first word.
> That may be a problem; if the app *knows* the length of
> the string, it may forget to set the buffer length; don't
> underestimate programmer's lazyness. I have found on
> dejanews a code snippet given as an example of how
> to use this api where the buffer length was lacking...
In that case string could be copyed to nowhere without terminating 0
as well. Whom to blame for that? Forgetful programmer or API function
that checked passed to it buffer size and filled that buffer?
I believe, that behaviour of EM_GETLINE in Win2000 was corrected because
application requesting the _string_ should receive a string. i.e the null
terminated one, taking into account that size of the passed buffer is large
Moreover, adding one more character to the passed buffer should not affect
any application, that took the trouble to initialize buffer size before the call.
Of course in the Wine code we can add comment about the difference in
implementations in win2000 and earlier incarnations. Even we can add the
version check and behave differently, but IMO it doesn't worth the trouble.
More information about the wine-users