summaryrefslogtreecommitdiff
path: root/ndisasm.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:49 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:49 +0000
commit76690a12ad212d1f77cd1f71d7ac5a9de6eaefb6 (patch)
tree6d1fe5322184b3e53a9378ce65f6a95f05b59f28 /ndisasm.c
parent6768eb71d8debde65562619c938b997aea1bd9f9 (diff)
downloadnasm-76690a12ad212d1f77cd1f71d7ac5a9de6eaefb6.tar.gz
nasm-76690a12ad212d1f77cd1f71d7ac5a9de6eaefb6.tar.bz2
nasm-76690a12ad212d1f77cd1f71d7ac5a9de6eaefb6.zip
NASM 0.96
Diffstat (limited to 'ndisasm.c')
-rw-r--r--ndisasm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ndisasm.c b/ndisasm.c
index bfbad8a..ffe6c12 100644
--- a/ndisasm.c
+++ b/ndisasm.c
@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <errno.h>
#include "nasm.h"
#include "nasmlib.h"
@@ -169,6 +170,11 @@ int main(int argc, char **argv) {
}
fp = fopen(filename, "rb");
+ if (!fp) {
+ fprintf(stderr, "%s: unable to open `%s': %s\n",
+ pname, filename, strerror(errno));
+ return 1;
+ }
if (initskip > 0)
skip (initskip, fp);