From c670c66e5bed6080b62b3cebea0c8ae1c3d7514d Mon Sep 17 00:00:00 2001 From: handa Date: Sun, 29 Jun 2008 13:15:21 +0000 Subject: [PATCH] (DEVICE_DELTA): Handle an invalid table. --- example/otfview.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 1.7.10.4