diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-10-09 16:26:22 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2017-10-12 12:28:04 -0700 |
commit | 11fc853b7c0acbbc1c8930e580bd6171227b1af6 (patch) | |
tree | bccb2f67989a5bd2209fc7e539d61e21720461d0 | |
parent | 78ea88d757ecf3a0a75b786ae343d746617ba46b (diff) | |
download | qtlocation-mapboxgl-upstream/cherry-pick-10175.tar.gz |
[core] Fix out-of-bounds array accessupstream/cherry-pick-10175
-rw-r--r-- | src/mbgl/util/i18n.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/util/i18n.cpp b/src/mbgl/util/i18n.cpp index 16f1d669f3..3e3a68e248 100644 --- a/src/mbgl/util/i18n.cpp +++ b/src/mbgl/util/i18n.cpp @@ -554,7 +554,7 @@ std::u16string verticalizePunctuation(const std::u16string& input) { std::u16string output; for (size_t i = 0; i < input.size(); i++) { - char16_t nextCharCode = i < input.size() ? input[i + 1] : 0; + char16_t nextCharCode = i < input.size() - 1 ? input[i + 1] : 0; char16_t prevCharCode = i ? input[i - 1] : 0; bool canReplacePunctuation = |