diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-05-10 18:58:29 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2008-05-10 18:58:29 +0000 |
commit | 17d018d54f9df84ef4a1b3624696bb231e590b93 (patch) | |
tree | f6fbd606840b308a07bd504c48991943c9da674d /generator | |
parent | 659c785abe7b5a2d50e5474f40c6692fc7a749bf (diff) | |
download | netpbm-mirror-17d018d54f9df84ef4a1b3624696bb231e590b93.tar.gz netpbm-mirror-17d018d54f9df84ef4a1b3624696bb231e590b93.tar.xz netpbm-mirror-17d018d54f9df84ef4a1b3624696bb231e590b93.zip |
handle empty input
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@618 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator')
-rw-r--r-- | generator/pbmtext.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/generator/pbmtext.c b/generator/pbmtext.c index 251f051a..40423db9 100644 --- a/generator/pbmtext.c +++ b/generator/pbmtext.c @@ -823,7 +823,11 @@ main(int argc, char *argv[]) { computeImageWidth(formattedText, fontP, cmdline.space, hmargin, &cols, &maxleftb); - + + if (cols == 0 || rows == 0) + pm_error("Input is all whitespace and/or non-renderable characters. " + "No output."); + bits = pbm_allocarray(cols, rows); /* Fill background with white */ |