diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2024-03-28 18:38:54 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2024-03-28 18:38:54 +0000 |
commit | 15e39fc31e191cc020b21e3c6e682a2e2ae15f54 (patch) | |
tree | f97693986a6294a8ef291792a236e142fc4366b9 /lib/libppmcolor.c | |
parent | 0003d7e73efc20c4b7b9e3de65954894368e8c2d (diff) | |
download | netpbm-mirror-15e39fc31e191cc020b21e3c6e682a2e2ae15f54.tar.gz netpbm-mirror-15e39fc31e191cc020b21e3c6e682a2e2ae15f54.tar.xz netpbm-mirror-15e39fc31e191cc020b21e3c6e682a2e2ae15f54.zip |
Don't ignore garbage at the end of a color specifier
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4891 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/libppmcolor.c')
-rw-r--r-- | lib/libppmcolor.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libppmcolor.c b/lib/libppmcolor.c index d6f00218..baa1d568 100644 --- a/lib/libppmcolor.c +++ b/lib/libppmcolor.c @@ -247,11 +247,8 @@ readOpenColorFile(FILE * const colorFileP, unsigned int nColorsDone; bool done; - nColorsDone = 0; - done = false; - *errorP = NULL; + for (nColorsDone = 0, done = false, *errorP = NULL; !done && !*errorP; ) { - while (!done && !*errorP) { struct colorfile_entry const ce = pm_colorget(colorFileP); if (!ce.colorname) |