summaryrefslogtreecommitdiff
path: root/methods/rred.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/rred.cc')
-rw-r--r--methods/rred.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/methods/rred.cc b/methods/rred.cc
index f53f05ad5..3453bd3bc 100644
--- a/methods/rred.cc
+++ b/methods/rred.cc
@@ -441,8 +441,12 @@ class Patch {
bool cmdwanted = true;
Change ch(std::numeric_limits<size_t>::max());
- if (f.ReadLine(buffer, sizeof(buffer)) == NULL)
+ if (f.ReadLine(buffer, sizeof(buffer)) == nullptr)
+ {
+ if (f.Eof())
+ return true;
return _error->Error("Reading first line of patchfile %s failed", f.Name().c_str());
+ }
do {
if (h != NULL)
h->Add(buffer);