Corrected a compilation warning
This commit is contained in:
parent
b514b34120
commit
9d9a8bd83d
1 changed files with 3 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue