projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcf9e61
)
Fix undefined behavior in cmp function
author
Behdad Esfahbod
<behdad@behdad.org>
Mon, 7 Dec 2015 09:34:47 +0000
(10:34 +0100)
committer
Behdad Esfahbod
<behdad@behdad.org>
Mon, 7 Dec 2015 09:34:47 +0000
(10:34 +0100)
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93274
src/hb-ot-map-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-ot-map-private.hh
b/src/hb-ot-map-private.hh
index
6f62c77
..
8692caa
100644
(file)
--- a/
src/hb-ot-map-private.hh
+++ b/
src/hb-ot-map-private.hh
@@
-203,7
+203,8
@@
struct hb_ot_map_builder_t
unsigned int stage[2]; /* GSUB/GPOS */
static int cmp (const feature_info_t *a, const feature_info_t *b)
- { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) : (a->seq < b->seq ? -1 : 1); }
+ { return (a->tag != b->tag) ? (a->tag < b->tag ? -1 : 1) :
+ (a->seq < b->seq ? -1 : a->seq > b->seq ? 1 : 0); }
};
struct stage_info_t {