Check for '.' in filename only, not the whole path.
[fw/sdcc] / link / z80 / lklibr.c
index be82f7bca79900a644ea727df81020b37e680590..c712d6745f7cad74f7d3ca8914f818557a27ffe3 100644 (file)
@@ -777,7 +777,7 @@ int buildlibraryindex(void)
                                } else {
                                        strcat(str,relfil);
                                }
-                               if(strchr(str,FSEPX) == NULL) {
+                               if(strchr(relfil, FSEPX) == NULL) {
 #ifdef SDK
                                        sprintf(&str[strlen(str)], "%co", FSEPX);
 #else /* SDK */
@@ -1061,7 +1061,7 @@ char *name;
                    } else {
                        strcat(str,relfil);
                    }
-                   if(strchr(relfil,FSEPX) == NULL) {
+                   if(strchr(relfil, FSEPX) == NULL) {
 #ifdef SDK
                        sprintf(&str[strlen(str)], "%co", FSEPX);
 #else /* SDK */