Chromium Code Reviews| Index: third_party/hunspell/google/bdict_reader.cc |
| diff --git a/third_party/hunspell/google/bdict_reader.cc b/third_party/hunspell/google/bdict_reader.cc |
| index a70127d44d3982b231dfffb8c3e17f35da1b08e7..358a8e2624e3e6c96e095fecfb8a92c602e48ef0 100644 |
| --- a/third_party/hunspell/google/bdict_reader.cc |
| +++ b/third_party/hunspell/google/bdict_reader.cc |
| @@ -782,6 +782,10 @@ LineIterator BDictReader::GetOtherLineIterator() const { |
| } |
| ReplacementIterator BDictReader::GetReplacementIterator() const { |
| + if (!bdict_data_ || |
| + aff_header_->rep_offset == 0 || |
| + aff_header_->rep_offset >= bdict_length_) |
| + return ReplacementIterator(bdict_data_, 0, 0); // Item is empty or invalid. |
|
please use gerrit instead
2016/06/21 16:35:44
nit: {}
groby-ooo-7-16
2016/06/21 18:22:40
Keeping it consistent with the rest of the file.
|
| return ReplacementIterator(bdict_data_, bdict_length_, |
| aff_header_->rep_offset); |
| } |