diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-21 13:20:44 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-21 13:20:44 -0400 |
commit | 9d9a8bd83d324ab5169f01f675d62844964dbd4f (patch) | |
tree | f42b2431c84e3cca315353c4ac5576c2b6e758d0 /src/expr.cc | |
parent | b514b34120de60f6e6f38684e2a94cf864a81407 (diff) | |
download | fork-ledger-9d9a8bd83d324ab5169f01f675d62844964dbd4f.tar.gz fork-ledger-9d9a8bd83d324ab5169f01f675d62844964dbd4f.tar.bz2 fork-ledger-9d9a8bd83d324ab5169f01f675d62844964dbd4f.zip |
Corrected a compilation warning
Diffstat (limited to 'src/expr.cc')
-rw-r--r-- | src/expr.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/expr.cc b/src/expr.cc index 0769d575..5bc537d9 100644 --- a/src/expr.cc +++ b/src/expr.cc @@ -52,8 +52,9 @@ void expr_t::parse(std::istream& in, const parse_flags_t& flags, in.seekg(start_pos, std::ios::beg); scoped_array<char> buf (new char[static_cast<std::size_t>(end_pos - start_pos) + 1]); - in.read(buf.get(), end_pos - start_pos); - buf[end_pos - start_pos] = '\0'; + int len = static_cast<int>(end_pos) - static_cast<int>(start_pos); + in.read(buf.get(), len); + buf[len] = '\0'; set_text(buf.get()); } else { |