[eggheads-patches] bug 315

Matyas Koszik koszik at sirklabs.hu
Sun Mar 16 10:29:12 CST 2003


I think this will fix bug 315.
-------------- next part --------------
diff -ru eggdrop1.6/src/mod/filesys.mod/files.c eggdrop1.6-fix/src/mod/filesys.mod/files.c
--- eggdrop1.6/src/mod/filesys.mod/files.c	2003-03-12 09:42:00.000000000 +0100
+++ eggdrop1.6-fix/src/mod/filesys.mod/files.c	2003-03-16 17:25:57.000000000 +0100
@@ -240,9 +240,10 @@
       }
       free_fdbe(&fdbe);
       malloc_strcpy(s, *real);
-      if (s[0])
-        if (s[strlen(s) - 1] != '/')
+      if (s[0] && s[strlen(s) - 1] != '/') {
+          s = nrealloc(s, strlen(s) + 2);
           strcat(s, "/");
+      }
       work = nmalloc(strlen(s) + strlen(elem) + 1);
       sprintf(work, "%s%s", s, elem);
       malloc_strcpy(*real, work);


More information about the Patches mailing list