]> git.tdb.fi Git - ttf2png.git/commitdiff
Reject reversed code point ranges
authorMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 11:25:42 +0000 (14:25 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 31 Mar 2021 11:26:36 +0000 (14:26 +0300)
ttf2png.c

index 27838112917fe5b3d854e7e03b6a80efccf40a3c..d3ea069db4342a53f02ba58215f6df5ca08a9469 100644 (file)
--- a/ttf2png.c
+++ b/ttf2png.c
@@ -348,7 +348,7 @@ void convert_code_point_range(char opt, Range *range)
        {
                range->first = value;
                value = str_to_code_point(ptr+1, &ptr);
-               if(value>=0 && !*ptr)
+               if(value>=(int)range->first && !*ptr)
                {
                        range->last = value;
                        return;