* support/regression/collate-results.py: fixed output in case of a valdiag error
[fw/sdcc] / as / hc08 / lklibr.c
index 74c8c361b251dfa16bff3a32e91d4215f732b912..eb33beafd1c498e6ba64f928f0fa5c1767db785a 100644 (file)
@@ -237,7 +237,7 @@ int addfile(char * path, char * libfil)
         That way putting 'path' and 'libfil' together will result into the original filepath
         as contained in 'str'.*/
         int j;
-        path = (char *) new (strlen(str));
+        path = (char *) new (strlen(str) + 1);
         strcpy(path, str);
         for(j=strlen(path)-1; j>=0; j--)
         {