CIFgen: Fix processing of MASKHINTS_* properties

- Don't print error if there is no more data to process
 - Fix error message: `propname` already has the
   MASKHINTS_ prefix

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2020-12-27 10:33:02 +01:00
parent 01e86c0d46
commit eb945dc6ef
1 changed files with 2 additions and 3 deletions

View File

@ -5157,7 +5157,7 @@ CIFGenLayer(op, area, cellDef, origDef, temps, hier, clientdata)
propvalue = (char *)DBPropGet(origDef, propname, &found);
if (!found) break; /* No mask hints available */
propptr = propvalue;
while (TRUE)
while (*propptr)
{
numfound = sscanf(propptr, "%d %d %d %d",
&bbox.r_xbot, &bbox.r_ybot,
@ -5169,8 +5169,7 @@ CIFGenLayer(op, area, cellDef, origDef, temps, hier, clientdata)
* at the start of the list and parse accordingly.
* For now, this only flags an error.
*/
TxError("MASKHINTS_%s: Cannot read rectangle values.\n",
propname);
TxError("%s: Cannot read rectangle values.\n", propname);
break;
}
cifScale = (CIFCurStyle) ? CIFCurStyle->cs_scaleFactor : 1;