diff --git a/main.c b/main.c index e73cd8d..e53495c 100644 --- a/main.c +++ b/main.c @@ -232,6 +232,9 @@ main(int argc, char *argv[]) /* treat +thing as an option for C++ */ if (endmarker && **argv == '+') continue; + if (fp >= filelist + MAXFILES) { + fatalerr("Too many source files. Limit are %i files.\n", MAXFILES); + } *fp++ = argv[0]; continue; }