[Top][All Lists]

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

[DotGNU]<PNET> String.Replace(char,char) bug & fix

From: Gopal.V
Subject: [DotGNU]<PNET> String.Replace(char,char) bug & fix
Date: Sun, 3 Feb 2002 20:06:40 +0530
User-agent: Mutt/1.2.5i

Hi Rhys,        
        This is a *real* bug in the runtime engine. The extern method of
String.Replace(char,char) is wrong !. 

<snip from "pnet/engine/lib_string.c">

        while(len > 0)
                if(*buf1 != oldChar)
                        *buf2++ = *buf1++;
                        *buf2++ = newChar;//did you miss a buf1++ here ?

        At 5000 lines a week it's easy to miss the roadsigns, but
don't worry we're here to bang out the bugs. This pnetcgi is 
really churning up bugs for Pnet !.(and fixes in this case). 

        The patch attatched. And I wonder why nobody found this bug
before. /Me thinks I'm the second guy since Rhys to read the code.
Anyway, hope that more people start experimenting with more things
than a HelloWorld program. 

        Also another bug seems to be that the Random.Next(int MaxValue)
always seems to return a big negative number -18446744071562067968.
But couldn't pin it down. Code for that is also attatched.

 The difference between insanity and genius is only measured by success

Attachment: gopal-020203.patch
Description: Text document

Attachment: rand.cs
Description: Text document

Attachment: str.cs
Description: Text document

reply via email to

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