summaryrefslogtreecommitdiff
path: root/src/io/write.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-08-25 16:22:11 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-08-25 16:23:00 -0700
commite8aa00b76fb9d19714a9d05dc6dd09ae10c5250e (patch)
treef44003de86b3160de1ab39fcf4c7559b8fa25f7b /src/io/write.cpp
parente11badbebd078be3437a06a1fb72a7f01c3afd5c (diff)
downloadtmwa-e8aa00b76fb9d19714a9d05dc6dd09ae10c5250e.tar.gz
tmwa-e8aa00b76fb9d19714a9d05dc6dd09ae10c5250e.tar.bz2
tmwa-e8aa00b76fb9d19714a9d05dc6dd09ae10c5250e.tar.xz
tmwa-e8aa00b76fb9d19714a9d05dc6dd09ae10c5250e.zip
Fix potential file corruption with partial writesv14.4.20
Diffstat (limited to 'src/io/write.cpp')
-rw-r--r--src/io/write.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/io/write.cpp b/src/io/write.cpp
index 5993a69..a216b03 100644
--- a/src/io/write.cpp
+++ b/src/io/write.cpp
@@ -89,6 +89,7 @@ namespace io
dat += rv;
len -= rv;
}
+ std::copy(dat, dat + len, buf);
buflen = len;
maybe_linebuffered: