From 9bddfde25dc8c302c765a1e9a8a2c38c4a836e2e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 6 Nov 2018 11:03:34 -0500 Subject: [PATCH] [util] Fix up previous commit --- util/options.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util/options.cc b/util/options.cc index 3b22ca723..3f8fa3d04 100644 --- a/util/options.cc +++ b/util/options.cc @@ -729,9 +729,13 @@ const char * text_options_t::get_line (unsigned int *len) { if (text) { - if (!line) line = text; - if (line_len == (unsigned int) -1) + if (!line) + { + line = text; line_len = text_len; + } + if (line_len == (unsigned int) -1) + line_len = strlen (line); if (!line_len) { *len = 0;