From: handa Date: Sun, 29 Jun 2008 13:15:31 +0000 (+0000) Subject: (dump_device_table): Handle an invalid table. X-Git-Tag: REL-0-9-8~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2e0552a0ca6e6253f82afef55bc1897803e86efb;p=m17n%2Flibotf.git (dump_device_table): Handle an invalid table. --- diff --git a/example/otfdump.c b/example/otfdump.c index 5189771..a34cd77 100644 --- a/example/otfdump.c +++ b/example/otfdump.c @@ -306,10 +306,14 @@ dump_device_table (int indent, char *title, OTF_DeviceTable *table) indent++; IPRINT ("(StartSize %d) (EndSize %d) (DeltaFormat %d)", table->StartSize, table->EndSize, table->DeltaFormat); - IPRINT ("(DeltaValue"); - for (i = 0; i < table->EndSize - table->StartSize + 1; i++) - printf (" %d", table->DeltaValue[i]); - printf ("))"); + if (table->DeltaValue) + { + IPRINT ("(DeltaValue"); + for (i = 0; i < table->EndSize - table->StartSize + 1; i++) + printf (" %d", table->DeltaValue[i]); + printf (")"); + } + printf (")"); }