(extract_charset_name): Fix silly bugs in last addition.
authordrepper <drepper>
Wed, 13 May 1998 16:05:03 +0000 (16:05 +0000)
committerdrepper <drepper>
Wed, 13 May 1998 16:05:03 +0000 (16:05 +0000)
wcsmbs/wcsmbsload.c

index 5373da9..1f40655 100644 (file)
@@ -96,15 +96,15 @@ getfct (const char *to, const char *from)
     const char *cp = str;                                                    \
     char *result = NULL;                                                     \
                                                                              \
-    while (strchr ("@._+,", *cp) == NULL)                                    \
+    while (strchr ("@.+,", *cp) == NULL)                                     \
       ++cp;                                                                  \
     if (*cp == '.')                                                          \
       {                                                                              \
-       const char *endp = cp;                                                \
+       const char *endp = ++cp;                                              \
        while (*endp != '\0' && *endp != '@')                                 \
          ++endp;                                                             \
        if (endp != cp)                                                       \
-         result = strndupa (str, endp - cp);                                 \
+         result = strndupa (cp, endp - cp);                                  \
       }                                                                              \
     result;                                                                  \
   })