diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-15 02:17:24 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-04-15 02:19:20 +0300 |
| commit | 86954b21c09770e7527bdafd34ebc31f3cefc2d1 (patch) | |
| tree | f25948135ef7ac5fd2a5637722670bd21d2b6a7f /tasm | |
| parent | e668bbc06ff95939627ef6082b1ca5cd4d198df6 (diff) | |
| download | tri-86954b21c09770e7527bdafd34ebc31f3cefc2d1.tar.gz tri-86954b21c09770e7527bdafd34ebc31f3cefc2d1.zip | |
add check against empty outfile
Diffstat (limited to 'tasm')
| -rw-r--r-- | tasm/src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tasm/src/main.c b/tasm/src/main.c index bb6a1ac..7925b89 100644 --- a/tasm/src/main.c +++ b/tasm/src/main.c @@ -1,5 +1,6 @@ #include <tasm/assembler.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> #include <stdio.h> @@ -43,7 +44,7 @@ int main(int argc, char *argv[]) } } - if (!outfile) { + if (!outfile || strlen(outfile) == 0) { fprintf(stderr, "no output file\n"); usage(); exit(EXIT_FAILURE); |
