Don't attempt to access a pointer to nowhere.

This commit is contained in:
tastytea 2021-06-06 21:34:48 +02:00
parent b8431019b7
commit 9708bb69c8
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 2 deletions

View File

@ -280,7 +280,7 @@ std::string headline(const file_in_epub &file, const size_t pos)
last = pair.second;
}
return last.data();
return string(last);
}
string page(const file_in_epub &file, const size_t pos)
@ -296,7 +296,7 @@ string page(const file_in_epub &file, const size_t pos)
last = pair.second;
}
return last.data();
return string(last);
}
} // namespace epubgrep::search