diff --git a/tccgen.c b/tccgen.c index 06d8f027..dd6a497a 100644 --- a/tccgen.c +++ b/tccgen.c @@ -3569,7 +3569,7 @@ again: if (ds <= ss) goto done; /* ss <= 4 here */ - if (ds <= 4 && dbt != (VT_SHORT | VT_UNSIGNED) && sbt != VT_BYTE) { + if (ds <= 4 && !(dbt == (VT_SHORT | VT_UNSIGNED) && sbt == VT_BYTE)) { gv(RC_INT); goto done; /* no 64bit envolved */ } diff --git a/tccpe.c b/tccpe.c index 9b59d92c..c2aad8a1 100644 --- a/tccpe.c +++ b/tccpe.c @@ -825,7 +825,7 @@ static void pe_build_imports(struct pe_info *pe) dllindex = p->dll_index; if (dllindex) - name = (dllref = pe->s1->loaded_dlls[dllindex-1])->name; + name = tcc_basename((dllref = pe->s1->loaded_dlls[dllindex-1])->name); else name = "", dllref = NULL; @@ -1763,7 +1763,7 @@ static int pe_load_dll(TCCState *s1, const char *filename) if (ret) { return -1; } else if (p) { - index = add_dllref(s1, tcc_basename(filename)); + index = add_dllref(s1, filename); for (q = p; *q; q += 1 + strlen(q)) pe_putimport(s1, index, q, 0); tcc_free(p);