summaryrefslogtreecommitdiff
path: root/src/error.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-31 00:55:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-31 00:55:56 -0400
commita2cb549b1dff9024e3f700203e424e496b25fd91 (patch)
tree1c03e9eb6f649a1446021dfb2a5d93a697f81feb /src/error.cc
parent349fc5d175bc5c4acbc478b4d78c12dc507c4f58 (diff)
parenta88a4c55b2b11d58d3b9e49bf785be42afe63510 (diff)
downloadfork-ledger-a2cb549b1dff9024e3f700203e424e496b25fd91.tar.gz
fork-ledger-a2cb549b1dff9024e3f700203e424e496b25fd91.tar.bz2
fork-ledger-a2cb549b1dff9024e3f700203e424e496b25fd91.zip
Merge branch 'next'
Diffstat (limited to 'src/error.cc')
-rw-r--r--src/error.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/error.cc b/src/error.cc
index 70759b08..d5abe4de 100644
--- a/src/error.cc
+++ b/src/error.cc
@@ -96,10 +96,10 @@ string source_context(const path& file,
ifstream in(file);
in.seekg(pos, std::ios::beg);
- scoped_array<char> buf(new char[len + 1]);
- in.read(buf.get(), len);
- assert(in.gcount() == len);
- buf[len] = '\0';
+ scoped_array<char> buf(new char[static_cast<std::size_t>(len) + 1]);
+ in.read(buf.get(), static_cast<std::streamsize>(len));
+ assert(in.gcount() == static_cast<std::streamsize>(len));
+ buf[static_cast<std::size_t>(len)] = '\0';
bool first = true;
for (char * p = std::strtok(buf.get(), "\n");