* src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
[fw/sdcc] / src / SDCCmain.c
index 8f6b7c759142378341568596610222609565f8ba..e1da3c49e031660f5919bfa2b843af118d8e4f35 100644 (file)
@@ -1676,8 +1676,8 @@ linkEdit (char **envp)
           set *tempSet=NULL;
 
           tempSet = appendStrSet(libDirsSet, NULL, DIR_SEPARATOR_STRING);
-          tempSet = appendStrSet(libDirsSet, NULL, c);
-          mergeSets(&tempSet, libPathsSet);
+          tempSet = appendStrSet(tempSet, NULL, c);
+          mergeSets(&tempSet, libDirsSet);
 
           for (s = setFirstItem(tempSet); s != NULL; s = setNextItem(tempSet))
             {