X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=as%2Fhc08%2Flklibr.c;h=eb33beafd1c498e6ba64f928f0fa5c1767db785a;hb=96d7ac4503dd8dfdbf0fda88fa5a9de577f2f124;hp=2481d9f02a8e312f005e6bdf83a2467b82b453bf;hpb=3496b9c93e952c27e5310e3804f9dcbf9c3795ee;p=fw%2Fsdcc diff --git a/as/hc08/lklibr.c b/as/hc08/lklibr.c index 2481d9f0..eb33beaf 100644 --- a/as/hc08/lklibr.c +++ b/as/hc08/lklibr.c @@ -18,14 +18,6 @@ #define EQ(A,B) !strcmp((A),(B)) #define MAXLINE 254 /*when using fgets*/ -#if defined(__APPLE__) && defined(__MACH__) -#include -#include -#else -#ifdef HAVE_MALLOC_H -#include -#endif -#endif #include #include #include @@ -245,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--) {