[Rebar] Don't store band text if "" is passed into SetBandInfo

Robert Shearman R.J.Shearman at warwick.ac.uk
Tue Oct 21 16:27:25 CDT 2003


On Tuesday 21 October 2003 8:26 pm, you wrote:
> On Tue, Oct 21, 2003 at 07:24:31PM +0100, Robert Shearman wrote:
> > @@ -3447,8 +3450,11 @@
> >  	}
> >  	if (lprbbi->lpText) {
> >  	    INT len = lstrlenW (lprbbi->lpText);
> > -	    lpBand->lpText = (LPWSTR)Alloc ((len + 1)*sizeof(WCHAR));
> > -	    strcpyW (lpBand->lpText, lprbbi->lpText);
> > +	    if (len > 1)
>
> Shouldn't this be len >= 1 ?

You are absolutely correct, although I have made it len > 0 to be consistent 
with InsertBandW.

Rob

Changelog:
- Don't store band text if "" is passed into SetBandInfo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rebar.diff
Type: text/x-diff
Size: 1214 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20031021/a269298b/rebar.bin


More information about the wine-patches mailing list