From 62e7dcff2d5863811edff431baf96a30d36ee872 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 9 Jun 2019 04:25:51 +0000 Subject: Don't allow both -font and -builtin git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3629 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- generator/pbmtext.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'generator') diff --git a/generator/pbmtext.c b/generator/pbmtext.c index e6f27865..a840d1df 100644 --- a/generator/pbmtext.c +++ b/generator/pbmtext.c @@ -153,6 +153,9 @@ parseCommandLine(int argc, const char ** argv, else if (cmdlineP->lspace < -pbm_maxfontheight()) pm_error("negative -lspace value too large"); + if (cmdlineP->font != NULL && cmdlineP->builtin != NULL) + pm_error("You cannot specify both -font and -builtin"); + if (cmdlineP->textdump) { if (cmdlineP->dryrun) pm_error("You cannot specify both -dry-run and -text-dump"); @@ -170,9 +173,8 @@ parseCommandLine(int argc, const char ** argv, pm_error("-wchar is not valid when text is from command line"); cmdlineP->text = textFmCmdLine(argc, argv); - - } + free(option_def); } -- cgit 1.4.1