<div dir="auto">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. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2019年7月6日(土) 13:01 Lawrence D'Oliveiro <<a href="mailto:ldo@geek-central.gen.nz">ldo@geek-central.gen.nz</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 4 Jul 2019 19:04:25 +0900, Akira TAGOH wrote:<br>
<br>
> not returning FcFalse on fail is a bug.<br>
<br>
The problem seems to be caused by the “complain = FcFalse;” line in<br>
the _FcConfigParse routine in fcxml.c. Removing it as follows:<br>
<br>
diff --git a/src/fcxml.c b/src/fcxml.c<br>
index 2e5898e..4e7e76a 100644<br>
--- a/src/fcxml.c<br>
+++ b/src/fcxml.c<br>
@@ -3604,7 +3604,6 @@ _FcConfigParse (FcConfig  *config,<br>
     close (fd);<br>
<br>
     ret = FcConfigParseAndLoadFromMemoryInternal (config, filename, FcStrBufDoneStatic (&sbuf), complain, load);<br>
-    complain = FcFalse; /* no need to reclaim here */<br>
 bail1:<br>
     FcStrBufDestroy (&sbuf);<br>
 bail0:<br>
<br>
causes the parse routine to return false on error, as expected.<br>
<br>
Any reason why that line is there?<br>
_______________________________________________<br>
Fontconfig mailing list<br>
<a href="mailto:Fontconfig@lists.freedesktop.org" target="_blank" rel="noreferrer">Fontconfig@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/fontconfig" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/fontconfig</a></blockquote></div>