projects
/
m17n
/
libotf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35fe3cd
)
(get_class_def_auto): Return 0 if C is negative.
author
handa
<handa>
Mon, 23 Apr 2012 00:28:46 +0000
(
00:28
+0000)
committer
handa
<handa>
Mon, 23 Apr 2012 00:28:46 +0000
(
00:28
+0000)
src/otfdrive.c
patch
|
blob
|
history
diff --git
a/src/otfdrive.c
b/src/otfdrive.c
index
97e1974
..
dc94ed4
100644
(file)
--- a/
src/otfdrive.c
+++ b/
src/otfdrive.c
@@
-1563,7
+1563,7
@@
static int get_class_def_auto (int c)
= sizeof glyph_class_table / sizeof glyph_class_table[0];
int low, high, mid;
- if (c >= glyph_class_table[table_size - 1])
+ if (c < 0 || c >= glyph_class_table[table_size - 1])
return 0;
low = 0;
high = table_size - 1;