From e3a291ea439f71a6ea3ac531e8ac852e1509714c Mon Sep 17 00:00:00 2001 From: bakkeby Date: Thu, 20 Jan 2022 11:12:20 +0100 Subject: [PATCH] dynamic options vs TSV patch issue ref. #8 --- patch/dynamicoptions.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/patch/dynamicoptions.c b/patch/dynamicoptions.c index d358469..aca7d49 100644 --- a/patch/dynamicoptions.c +++ b/patch/dynamicoptions.c @@ -33,6 +33,12 @@ readstream(FILE* stream) *p = '\0'; if (!(items[i].text = strdup(buf))) die("cannot strdup %u bytes:", strlen(buf) + 1); + #if TSV_PATCH + if ((p = strchr(buf, '\t'))) + *p = '\0'; + if (!(items[i].stext = strdup(buf))) + die("cannot strdup %u bytes:", strlen(buf) + 1); + #endif // TSV_PATCH #if MULTI_SELECTION_PATCH items[i].id = i; #else