Fix narrowing conversion.
GitOrigin-RevId: c9f9fe9be4285b82e875140900065e328b8df32f
This commit is contained in:
parent
79df9bac53
commit
901e8cb224
@ -81,7 +81,7 @@ StringBuilder &StringBuilder::operator<<(double x) {
|
||||
auto left = end_ptr_ + reserved_size - current_ptr_;
|
||||
if (unlikely(len >= left)) {
|
||||
error_flag_ = true;
|
||||
len = left - 1;
|
||||
len = left ? narrow_cast<int>(left - 1) : 0;
|
||||
}
|
||||
ss->read(current_ptr_, len);
|
||||
current_ptr_ += len;
|
||||
|
Loading…
Reference in New Issue
Block a user