From: Bruno Haible Date: Mon, 10 Dec 2001 12:48:56 +0000 (+0000) Subject: Avoid false positives. X-Git-Tag: v0.11~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=739afebe37023cbfedf0cd7e9aa786b229ecb42a;p=thirdparty%2Fgettext.git Avoid false positives. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4ffaa0e63..898b36302 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-12-10 Bruno Haible + + * x-java.l (tailcmp): If s1 ends with s2, it must be either equal to + s2 or have a dot right before s2. + 2001-12-01 Bruno Haible * msginit.c (project_id): Make it possible to specify the location diff --git a/src/x-java.l b/src/x-java.l index 883f71a4d..d5afe958b 100644 --- a/src/x-java.l +++ b/src/x-java.l @@ -444,7 +444,7 @@ tailcmp (s1, s2) int start = len1 - len2; if (start < 0) return false; - return strcmp (s1 + start, s2) == 0; + return (start == 0 || s1[start-1] == '.') && (strcmp (s1 + start, s2) == 0); } /**