nixpkgs/pkgs/applications/misc/fbreader/typecheck.patch
Jan Malakhovski a402c8f295 fbreader: 0.99.4 -> 0.99.6, switch to fetchFromGitHub, add more build options (#45840)
This, apparently, is not an official release (it's tagged, but the tarball is not
available on the official site), but this repo is the official repo mentioned on
the official site.

This fixes a bunch of very annoying bugs present in 0.99.4, e.g.

```
$ FBReader filename
```

does not crash anymore. Yay!
2018-09-02 21:47:06 +02:00

12 lines
504 B
Diff

diff --git a/fbreader/src/database/booksdb/BooksDB.cpp b/fbreader/src/database/booksdb/BooksDB.cpp
index e33a22e76..1b6092800 100644
--- a/fbreader/src/database/booksdb/BooksDB.cpp
+++ b/fbreader/src/database/booksdb/BooksDB.cpp
@@ -146,5 +146,5 @@ shared_ptr<Book> BooksDB::loadBook(const std::string &fileName) {
myFindFileId->setFileName(fileName);
if (!myFindFileId->run()) {
- return false;
+ return 0;
}
((DBIntValue&)*myLoadBook->parameter("@file_id").value()) = myFindFileId->fileId();