1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-30 03:56:13 +02:00

sch2fig/main.c (main): fail if there is no gfx driver name

This commit is contained in:
Werner Almesberger 2016-08-01 12:42:27 -03:00
parent c6713dfbd8
commit f8f497c61a

View File

@ -95,6 +95,8 @@ int main(int argc, char *const *argv)
gfx_argv[1] = NULL;
} else {
gfx_argc = argc - dashdash - 1;
if (!gfx_argc)
usage(*argv);
gfx_argv = alloc_size(sizeof(const char *) * (gfx_argc + 1));
memcpy(gfx_argv, argv + dashdash + 1,
sizeof(const char *) * (gfx_argc + 1));