From: handa Date: Sun, 29 Jun 2008 13:15:21 +0000 (+0000) Subject: (DEVICE_DELTA): Handle an invalid table. X-Git-Tag: REL-0-9-8~5 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c670c66e5bed6080b62b3cebea0c8ae1c3d7514d;p=m17n%2Flibotf.git (DEVICE_DELTA): Handle an invalid table. --- diff --git a/example/otfview.c b/example/otfview.c index 79428da..8a069f2 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -268,9 +268,10 @@ get_features (OTF_FeatureList *list, FeatureRec *rec) } -#define DEVICE_DELTA(table, size) \ - (((size) >= (table).StartSize && (size) <= (table).EndSize) \ - ? (table).DeltaValue[(size) >= (table).StartSize] \ +#define DEVICE_DELTA(table, size) \ + (((table).DeltaValue \ + && ((size) >= (table).StartSize && (size) <= (table).EndSize)) \ + ? (table).DeltaValue[(size) >= (table).StartSize] \ : 0) void