5ef304e4e331d569503868bed13ee13518d58f3a angie Tue Feb 26 12:03:28 2013 -0800 bugfix: if some word is NULL, print out empty string. diff --git src/lib/annoFormatTab.c src/lib/annoFormatTab.c index af47fda..8d9518b 100644 --- src/lib/annoFormatTab.c +++ src/lib/annoFormatTab.c @@ -142,31 +142,31 @@ } if (row != NULL) fprintf(f, "\t%u\t%u", row->start, row->end); else fputs("\t\t", f); } struct annoColumn *col; int i; for (col = streamer->columns, i = 0; col != NULL; col = col->next, i++) { if (! col->included) continue; if (!isFirst || i > 0) fputc('\t', f); if (words != NULL) - fputs(words[i], f); + fputs((words[i] ? words[i] : ""), f); } if (freeWhenDone) { freeMem(words[0]); freeMem(words); } } static void aftFormatOne(struct annoFormatter *vSelf, struct annoRow *primaryRow, struct slRef *gratorRowList) /* Print out tab-separated columns that we have gathered in prior calls to aftCollect, * and start over fresh for the next line of output. */ { struct annoFormatTab *self = (struct annoFormatTab *)vSelf; // How many rows did each grator give us, and what's the largest # of rows?