Skip to content

Commit

Permalink
Fix textdomain id computation when there are >=128 textdomains and ch…
Browse files Browse the repository at this point in the history
…ar is signed (as on windows).
  • Loading branch information
jostephd committed Jan 7, 2019
1 parent 31c3e6a commit bfb4726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tstring.cpp
Expand Up @@ -115,7 +115,7 @@ void t_string_base::walker::update()
end_ = string_.size();
}

id = string_[begin_ + 1] + string_[begin_ + 2] * 256;
id = static_cast<unsigned int>(string_[begin_ + 1]) + static_cast<unsigned int>(string_[begin_ + 2]) * 256;
if(id >= id_to_textdomain.size()) {
ERR_CF << "Error: invalid string: " << string_ << std::endl;
begin_ = string_.size();
Expand Down

0 comments on commit bfb4726

Please sign in to comment.