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.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Date: Mon, 12 Jan 2009 17:21:06 +0200 From: "Kirill A. Shutemov" To: devel@lists.altlinux.org Message-ID: <20090112152106.GC6737@epbyminw8406h.minsk.epam.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-10-30) Subject: [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 15:18:03 -0000 Archived-At: List-Archive: List-Post: --p2kqVDKq5asng8Dg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =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=D0=BD=D1=8B=D0=BC=D0=B8!=20 rpm =D1=81=D1=80=D0=B0=D0=B2=D0=BD=D0=B8=D0=B2=D0=B0=D0=B5=D1=82 =D1=8D=D1= =82=D0=B8 =D0=B2=D0=B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D1=81=D1=82=D1=8C: 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 them= */ 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; =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? --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.org/ --p2kqVDKq5asng8Dg 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) iEYEARECAAYFAklrX+IACgkQbWYnhzC5v6pzsgCcDaZ2nZpg2ikZi850tt/tHyo9 jYkAmwcP+oWkFYF/pKUsa67hi99VGNFm =3Pq2 -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg--