]> mj.ucw.cz Git - libucw.git/blobdiff - lib/url.c
Renamed charset import scripts.
[libucw.git] / lib / url.c
index 0f4a50195570bb7cf198b8d6aa0b5342a2579cd4..d98c3a79832edda5e780ab03445a2b8fb9ffce35 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -16,6 +16,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <alloca.h>
 
 /* Configuration */
 
@@ -416,8 +417,8 @@ kill_end_dot(byte *b)
   if (b)
     {
       k = b + strlen(b) - 1;
-      if (k > b && *k == '.')
-       *k = 0;
+      while (k > b && *k == '.')
+       *k-- = 0;
     }
 }