FcConfigParseAndLoadFromMemoryInternal() is being shared by some functions and there are some duplicate messages in it. That flag is to avoid such thing though, it should be fixed by returning ret instead of FcTrue at the last line of that function.
2019年7月6日(土) 13:01 Lawrence D'Oliveiro <ldo@xxxxxxxxxxxxxxxxxxx>:
On Thu, 4 Jul 2019 19:04:25 +0900, Akira TAGOH wrote:
> not returning FcFalse on fail is a bug.
The problem seems to be caused by the “complain = FcFalse;” line in
the _FcConfigParse routine in fcxml.c. Removing it as follows:
diff --git a/src/fcxml.c b/src/fcxml.c
index 2e5898e..4e7e76a 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -3604,7 +3604,6 @@ _FcConfigParse (FcConfig *config,
close (fd);
ret = FcConfigParseAndLoadFromMemoryInternal (config, filename, FcStrBufDoneStatic (&sbuf), complain, load);
- complain = FcFalse; /* no need to reclaim here */
bail1:
FcStrBufDestroy (&sbuf);
bail0:
causes the parse routine to return false on error, as expected.
Any reason why that line is there?
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/fontconfig