[patch] size_t related bug fixes

Ralf Corsepius rc040203 at freenet.de
Mon Jun 12 08:31:59 PDT 2006


On Mon, 2006-06-12 at 18:23 +0300, Panu Matilainen wrote:
> On Mon, 2006-06-12 at 16:57 +0200, Ralf Corsepius wrote:
> > Hi again,
> > 
> > Now, some size_t related bug fixes, addressing to "unsigned vs. signed
> > types" issues.
> 
> Small thinko there, 
> 
> -      if ((stop < 0) || (stop > size)) stop = size;
> +      if ((stop != string::npos) || (stop > size)) stop = size;
> 
> ..should've been
> +      if ((stop == string::npos) || (stop > size)) stop = size;
Yep, you're right.

> Applied with the above fix, thanks.
Thanks.

Ralf





More information about the Apt-Rpm mailing list