diff --git a/libtcc.c b/libtcc.c index ec33591a..e209a19e 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1082,7 +1082,9 @@ LIBTCCAPI int tcc_add_file(TCCState *s, const char *filename) filetype = AFF_TYPE_ASMPP; else if (!strcmp(ext, "s")) filetype = AFF_TYPE_ASM; - else if (!PATHCMP(ext, "c") || !PATHCMP(ext, "i")) + else if (!PATHCMP(ext, "c") + || !PATHCMP(ext, "h") + || !PATHCMP(ext, "i")) filetype = AFF_TYPE_C; else filetype |= AFF_TYPE_BIN;