]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid false positives.
authorBruno Haible <bruno@clisp.org>
Mon, 10 Dec 2001 12:48:56 +0000 (12:48 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:35:44 +0000 (23:35 +0200)
src/ChangeLog
src/x-java.l

index 4ffaa0e63422187f199d2b829f103f4aad45648d..898b363025829c20fd09a94f9fdaa6e1d9d65471 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-10  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <bruno@clisp.org>
 
        * msginit.c (project_id): Make it possible to specify the location
index 883f71a4d8434b366dee43c5923e1a9f583c670b..d5afe958b4aca2dbe4b5a2652faafc2194a4122f 100644 (file)
@@ -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);
 }
 
 /**