<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:akira@tagoh.org" title="Akira TAGOH <akira@tagoh.org>"> <span class="fn">Akira TAGOH</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Check range of FcWeightFromOpenType argument."
href="https://bugs.freedesktop.org/show_bug.cgi?id=96676">bug 96676</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>akira@tagoh.org
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Check range of FcWeightFromOpenType argument."
href="https://bugs.freedesktop.org/show_bug.cgi?id=96676#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Check range of FcWeightFromOpenType argument."
href="https://bugs.freedesktop.org/show_bug.cgi?id=96676">bug 96676</a>
from <span class="vcard"><a class="email" href="mailto:akira@tagoh.org" title="Akira TAGOH <akira@tagoh.org>"> <span class="fn">Akira TAGOH</span></a>
</span></b>
<pre>I guess this may be what you prefer right?
diff --git a/src/fcweight.c b/src/fcweight.c
index 1a3b608..036a518 100644
--- a/src/fcweight.c
+++ b/src/fcweight.c
@@ -75,6 +75,7 @@ FcWeightFromOpenType (int ot_weight)
case 9: ot_weight = 900; break;
}
}
+ ot_weight = FC_MIN (ot_weight, map[(sizeof (map) / sizeof (map[0])) -
1].ot);
for (i = 1; ot_weight > map[i].ot; i++)
;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>