Re: kernel32: WideCharToMultiByte: return error on negative dest len (take 2)

2008-03-26 Thread Alexandre Julliard
"Dan Kegel" <[EMAIL PROTECTED]> writes: >> I don't want to claim ownership for the patch you wrote. > > Don't worry, Alexandre usually gets that right. Maybe, but I don't like it. I really prefer for people to send their own patches instead of having others do it for them. -- Alexandre Julliard

Re: kernel32: WideCharToMultiByte: return error on negative dest len (take 2)

2008-03-26 Thread Dan Kegel
On Wed, Mar 26, 2008 at 6:38 AM, Michael Stefaniuc <[EMAIL PROTECTED]> wrote: > > The first step, as Alexandre says, is to add the test with a todo_wine > > around the negative destlen test. > > I would have done it but I'm more than happy to let you run with it. > > Please go ahead and resubmit

Re: kernel32: WideCharToMultiByte: return error on negative dest len (take 2)

2008-03-26 Thread Michael Stefaniuc
Dan Kegel wrote: > On Wed, Mar 26, 2008 at 4:04 AM, Michael Stefaniuc <[EMAIL PROTECTED]> wrote: >> > This would require reviewing all uses of WideCharToMultiByte in Wine, >> > many places get this wrong. Unless you have an app that requires this >> > fix I'd suggest to leave the test as todo_wi

Re: kernel32: WideCharToMultiByte: return error on negative dest len (take 2)

2008-03-26 Thread Dan Kegel
On Wed, Mar 26, 2008 at 4:04 AM, Michael Stefaniuc <[EMAIL PROTECTED]> wrote: > > This would require reviewing all uses of WideCharToMultiByte in Wine, > > many places get this wrong. Unless you have an app that requires this > > fix I'd suggest to leave the test as todo_wine for now. > > Would

Re: kernel32: WideCharToMultiByte: return error on negative dest len (take 2)

2008-03-26 Thread Alexandre Julliard
Michael Stefaniuc <[EMAIL PROTECTED]> writes: > Would that be a good janitorial work to be done before Wine 1.0? I feel > like I'm getting tired of translating ... Sure, if you feel like doing it go ahead. I'm not sure the fix will go in before 1.0, but already fixing as many callers as possible

Re: kernel32: WideCharToMultiByte: return error on negative dest len (take 2)

2008-03-26 Thread Michael Stefaniuc
Alexandre Julliard wrote: > "Dan Kegel" <[EMAIL PROTECTED]> writes: > >> While investigating a crash in gs-auftrag in bug 9039, noticed >> WideCharToMultiByte wasn't quite conformant for negative destlen. >> Fixed, with tests. Passes for me in Wine and Win XP. > > This would require reviewing al

Re: kernel32: WideCharToMultiByte: return error on negative dest len (take 2)

2008-03-26 Thread Alexandre Julliard
"Dan Kegel" <[EMAIL PROTECTED]> writes: > While investigating a crash in gs-auftrag in bug 9039, noticed > WideCharToMultiByte wasn't quite conformant for negative destlen. > Fixed, with tests. Passes for me in Wine and Win XP. This would require reviewing all uses of WideCharToMultiByte in Wine

Re: kernel32: WideCharToMultiByte: return error on negative dest len

2008-03-24 Thread James Hawkins
On Mon, Mar 24, 2008 at 10:54 AM, Maarten Lankhorst <[EMAIL PROTECTED]> wrote: > Hello Dan and AJ, > > 2008/3/24, Alexandre Julliard <[EMAIL PROTECTED]>: > > > > "Dan Kegel" <[EMAIL PROTECTED]> writes: > > > > > +static void test_negative_dest_length(void) > > > +{ > > > +int len; > >

Re: kernel32: WideCharToMultiByte: return error on negative dest len

2008-03-24 Thread Maarten Lankhorst
Hello Dan and AJ, 2008/3/24, Alexandre Julliard <[EMAIL PROTECTED]>: > "Dan Kegel" <[EMAIL PROTECTED]> writes: > > > +static void test_negative_dest_length(void) > > +{ > > +int len; > > +char buf[10]; > > + > > +/* Test return on negative dest length */ > > +SetLastError( 0

Re: kernel32: WideCharToMultiByte: return error on negative dest len

2008-03-24 Thread Alexandre Julliard
"Dan Kegel" <[EMAIL PROTECTED]> writes: > +static void test_negative_dest_length(void) > +{ > +int len; > +char buf[10]; > + > +/* Test return on negative dest length */ > +SetLastError( 0xdeadbeef ); > +memset(buf,'x',sizeof(buf)); > +len = WideCharToMultiByte(CP_ACP, 0, f

Re: kernel32: WideCharToMultiByte: return error on negative dest len

2008-03-21 Thread Dan Kegel
On Fri, Mar 21, 2008 at 7:12 PM, James Hawkins <[EMAIL PROTECTED]> wrote: > > +#include > > Leftover from a previous version of the patch? Whoops, yes. I'll resend it Monday.

Re: kernel32: WideCharToMultiByte: return error on negative dest len

2008-03-21 Thread James Hawkins
On Fri, Mar 21, 2008 at 6:43 PM, Dan Kegel <[EMAIL PROTECTED]> wrote: > While investigating a crash in gs-auftrag in bug 9039, noticed > WideCharToMultiByte > wasn't quite conformant for negative destlen. Fixed, with tests. > > diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c > inde