Commit 86e75dfb authored by Patrick Lam's avatar Patrick Lam
Browse files

Explain apples/oranges comparison and fix compilation error.

reviewed by: plam
parent f076169d
2006-02-06 Dirk Mueller <dmueller@suse.de>
reviewed by: plam
* src/fcfs.c (FcFontSetUnserialize):
Explain apples/oranges comparison and fix compilation error.
2006-02-06 Dirk Mueller <dmueller@suse.de>
reviewed by: plam
......
......@@ -159,7 +159,10 @@ FcFontSetUnserialize(FcCache * metadata, FcFontSet * s, void * block_ptr)
nfont = *(int *)block_ptr;
block_ptr = (int *)block_ptr + 1;
if (nfont > 0 && nfont < metadata.count)
/* comparing nfont and metadata.count is a bit like comparing
apples and oranges. Its just for rejecting totally insane
nfont values, and for that its good enough */
if (nfont > 0 && nfont < metadata->count / sizeof(void*))
{
FcPattern * p = (FcPattern *)block_ptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment