From 7b87660ba1acad9cae980994bf9d856600ba644d Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Fri, 11 Nov 2016 02:47:42 +0300 Subject: [PATCH] emu_test: check for emu file name Signed-off-by: Dmitry Eremin-Solenikov --- test/emu_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/emu_test.c b/test/emu_test.c index 77091bd..4ce3ac8 100644 --- a/test/emu_test.c +++ b/test/emu_test.c @@ -36,6 +36,10 @@ int main(int argc, char **argv) if (argc == 1) { fname = openemv_config_get_str("scard.emu.file", NULL); + if (!fname) { + fprintf(stderr, "specify emu file\n"); + return 1; + } f = fopen(fname, "r"); } else if (!strcmp(argv[1], "-")) { fname = "";