From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Mon, 12 Jan 2009 22:03:02 +0200 From: "Kirill A. Shutemov" To: devel@lists.altlinux.org Message-ID: <20090112200302.GA14916@epbyminw8406h.minsk.epam.com> References: <20090112152106.GC6737@epbyminw8406h.minsk.epam.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: <20090112152106.GC6737@epbyminw8406h.minsk.epam.com> User-Agent: Mutt/1.5.18 (2008-10-30) Subject: Re: [devel] Q: rpmvercmp X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2009 19:59:58 -0000 Archived-At: List-Archive: List-Post: --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 12, 2009 at 05:21:06PM +0200, Kirill A. Shutemov wrote: > =D0=A1=D0=BB=D0=BE=D0=B2=D0=B8=D0=BB =D0=B7=D0=B0=D0=B1=D0=B0=D0=B2=D0=BD= =D1=8B=D0=B9 =D0=B1=D0=B0=D0=B3(=D1=84=D0=B8=D1=87=D1=83?) =D0=B2 rpmvercmp= =2E =D0=95=D1=81=D1=82=D1=8C =D0=B4=D0=B2=D0=B5 =D0=B2=D0=B5=D1=80=D1=81=D0= =B8=D0=B8 "1.a" =D0=B8 "1a".=20 > rpmvercmp =D1=81=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D1=82 =D0=B8=D1=85 =D1=80= =D0=B0=D0=B2=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8C=D0=BA=D0=BE, =D0=B5=D1=81=D0=BB=D0=B8 =D0=B2 = =D0=BE=D0=B1=D0=BE=D0=B8=D1=85 =D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0=D1=85 = =D0=BE=D0=BD=D0=B8 =D0=B5=D1=81=D1=82=D1=8C: >=20 > diff --git a/rpmdb/rpmvercmp.c b/rpmdb/rpmvercmp.c > index 5ac54dd..1539ae5 100644 > --- a/rpmdb/rpmvercmp.c > +++ b/rpmdb/rpmvercmp.c > @@ -34,8 +34,10 @@ int rpmvercmp(const char * a, const char * b) > =20 > /* loop through each version segment of str1 and str2 and compare th= em */ > while (*one && *two) { > - while (*one && !xisalnum(*one)) one++; > - while (*two && !xisalnum(*two)) two++; > + if ((*one && !xisalnum(*one)) && (*two && !xisalnum(*two))) { > + while (*one && !xisalnum(*one)) one++; > + while (*two && !xisalnum(*two)) two++; > + } > =20 > if ( !*one && !*two ) > return 0; >=20 > =D0=9A=D0=B0=D0=BA =D0=B2=D1=8B =D1=81=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D1= =82=D0=B5? =D0=9F=D0=BE=D1=81=D0=BA=D0=BE=D0=BB=D1=8C=D0=BA=D1=83 =D1=82=D1=83=D1=82 = =D0=BC=D0=B5=D0=BD=D1=8F =D0=B8=D0=B3=D0=BD=D0=BE=D1=80=D0=B8=D1=80=D1=83= =D1=8E=D1=82, =D0=B7=D0=B0=D0=B2=D1=91=D0=BB =D0=B1=D0=B0=D0=B3 #18493. =D0= =9C=D0=BE=D0=B6=D0=B5=D1=82 =D1=82=D0=B0=D0=BA =D1=87=D1=82=D0=BE-=D0=BD=D0= =B8=D0=B1=D1=83=D0=B4=D1=8C =D0=BE=D1=82=D0=B2=D0=B5=D1=82=D1=8F=D1=82. --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.org/ --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAklrofYACgkQbWYnhzC5v6oN7gCfa2u+PVx448Hw4pCe4y7v4cA/ OLkAn1fdM2ab0NNVOQuc/vEZMQdUyI0H =32ZY -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--