diff options
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 0c9eab6..efe543a 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -347,7 +347,8 @@ static int copy_ar(CF *cfp, off_t size) FILE* from = cfp->rFile; FILE* to = cfp->wFile; while (sz && - (nr = fread(buf, 1, sz < static_cast<off_t>(sizeof(buf)) ? static_cast<size_t>(sz) : sizeof(buf), from )) + (nr = fread(buf, 1, sz < static_cast<off_t>(sizeof(buf)) + ? static_cast<size_t>(sz) : sizeof(buf), from )) > 0) { sz -= nr; for (size_t off = 0; off < nr; nr -= off, off += nw) |