[util] Fix up previous commit

This commit is contained in:
Behdad Esfahbod 2018-11-06 11:03:34 -05:00
parent 3ec2e4fa7b
commit 9bddfde25d

View File

@ -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;