🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.lib.bug
Article #582

Re: libg++-1.36.3: bug in Itolong (class Integer)

#582
From: Isaac Salzman
Date: Tue, 13 Feb 1990 22:49
32 lines
1550 bytes
>dl@g.oswego.edu (Doug Lea) writes:
>
>Sorry for the error. Thanks for the fix.

I'm sorry for the error! The fix I sent out earlier was broken. Here's *my*
original "fix", which really does fix the problem at hand. I'm not
particularly fond of it (it's a hack) and I still think the code could be
written better. But here's the one line patch that'll get things working
(and i've tested it!)....

		    -isaac (salzman@rand.org)

*** Orig/Integer.cc	Mon Feb  5 15:31:29 1990
--- Integer.cc	Tue Feb 13 14:33:11 1990
***************
*** 353,359 ****
      return (rep->sgn == I_POSITIVE) ? MAXLONG : MINLONG;
    else
    {
!     unsigned long a = rep->s[SHORT_PER_LONG - 1];
      if (a >= I_MINNUM)
        return (rep->sgn == I_POSITIVE) ? MAXLONG : MINLONG;
      else
--- 353,359 ----
      return (rep->sgn == I_POSITIVE) ? MAXLONG : MINLONG;
    else
    {
!     unsigned long a = (rep->len == 1) ? 0 : rep->s[SHORT_PER_LONG - 1];
      if (a >= I_MINNUM)
        return (rep->sgn == I_POSITIVE) ? MAXLONG : MINLONG;
      else
Technical Details
Message-ID: <9002132249.AA09365@gaucho.rand.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!RAND.ORG!salzman
References: <9002131315.AA11656@g.oswego.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!RAND.ORG!salzman
From: salzman@RAND.ORG (Isaac Salzman)
Newsgroups: gnu.g++.lib.bug
Subject: Re: libg++-1.36.3: bug in Itolong (class Integer)
Message-ID: <9002132249.AA09365@gaucho.rand.org>
Date: 13 Feb 90 22:49:27 GMT
References: <9002131315.AA11656@g.oswego.edu>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: salzman@rand.org
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 32