diff options
-rw-r--r-- | src/error.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.cc b/src/error.cc index 542d12b9..88adfbdb 100644 --- a/src/error.cc +++ b/src/error.cc @@ -100,7 +100,7 @@ string source_context(const path& file, 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'; + buf[static_cast<std::ptrdiff_t>(len)] = '\0'; bool first = true; for (char * p = std::strtok(buf.get(), "\n"); |