Explain apples/oranges comparison and fix compilation error.
reviewed by: plam
This commit is contained in:
parent
f076169d19
commit
86e75dfb5d
|
@ -1,3 +1,10 @@
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue