bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DDD 3.3.1 displays "Help Overview" incorrectly.


From: Arnaud Desitter
Subject: Re: DDD 3.3.1 displays "Help Overview" incorrectly.
Date: Wed, 8 Aug 2001 10:33:18 +0100 (BST)

Hi,

Well spotted ! I actually fixed all bugs of that ilk a while ago and the 
patch is now committed in the CVS repository.
See: http://sourceforge.net/projects/ddd

> 
> There is a problem with tempraries (could be a gcc 2.95.3 problem) in
> CvtStringToXmString, converters.C that causes this.  Here is a patch:

gcc is not at fault as the code was non conforming.

> -           buf += MString(segment.before('\n').chars(), charset) + cr();

Basically "MString()" gets called after the destruction of 
"segment.before('\n')". Your fix is the proper solution.
Older C++ compilers used to delay the call to the destructor, hence
hiding these bugs until now.

Cheers,
Arnaud


> 
> Index: converters.C
> diff -u converters.C.orig converters.C
> --- converters.C.orig   Wed Aug  8 10:42:29 2001
> +++ converters.C        Wed Aug  8 10:39:17 2001
> @@ -549,7 +549,8 @@
>  
>         while (segment.contains('\n'))
>         {
> -           buf += MString(segment.before('\n').chars(), charset) + cr();
> +            string bef = segment.before('\n');
> +            buf += MString(bef.chars(), charset) + cr();
>             segment = segment.after('\n');
>         }
>  
> 
> Regards,
> 
>       Jan D.
> 
> _____________________________________________________________________

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]