vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.16k stars 138 forks source link

Fix termination when saving long-named expressions in a pre-proc loop #555

Closed jodavies closed 1 month ago

jodavies commented 2 months ago

It was not intended in #500 that this warning crashes form, which happened here when Save was called in a pre-processor loop. This is due to the leading & of the message which triggers the source file line information. Warning protects from the crash by temporarily setting the "iswarning" variable which causes MesPrint to then not terminate.

This can be easily cleaned up later if Warning is refactored to take a format string and variable arguments.

An alternative would be to move the static int iswarning; of message.c into one of the header files, but that seems equally as messy as this fix.

coveralls commented 2 months ago

Coverage Status

coverage: 50.008% (+0.04%) from 49.968% when pulling ca8f53a53a0989200353d45d813b1371d1bedfd5 on jodavies:better-500 into 4fc8e4047a2678c3d0d264f29866491107f0a63c on vermaseren:master.