From 15e39fc31e191cc020b21e3c6e682a2e2ae15f54 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 28 Mar 2024 18:38:54 +0000 Subject: 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 --- lib/libppmcolor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/libppmcolor.c') 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) -- cgit 1.4.1