Likely, res_file is used somewhere to check something. In case a
resource file was loaded earlier, but the current parsing is from
a string, res_file is still != NULL, so this check would mislead.
Solution: Clear res_file and res_filename as soon as the file behind it gets closed.
Also replace a number of zeros with the more appropriate NULL.
A commit which affected this bug was removed from the repository cee2b55cb4f75ac e616d8f518 git.geda- project. org/pcb/ commit/ ?id=32941c40201 5bcdcee2b55cb4f 75ace616d8f518
git master commit 32941c402015bcd
http://
commit 32941c402015bcd cee2b55cb4f75ac e616d8f518
Author: Markus Hitter <email address hidden>
Commit: Markus Hitter <email address hidden>
src/ res_parse. y: handle resource globals gracefully.
Likely, res_file is used somewhere to check something. In case a
resource file was loaded earlier, but the current parsing is from
a string, res_file is still != NULL, so this check would mislead.
Solution: Clear res_file and res_filename as soon as the file
behind it gets closed.
Also replace a number of zeros with the more appropriate NULL.
Affects-bug: lp-1206882