Don't attempt to access a pointer to nowhere.
This commit is contained in:
parent
b8431019b7
commit
9708bb69c8
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user