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-13 10:48:21 -0700 |
commit | d7d3d2c7311c5fed79537e39b8c3ea1f954b8ccf (patch) | |
tree | 51241487f257ca7f487509d429f075baa8ecbf00 /src | |
parent | 06a18dd5485005ab87420c8e4c609f68984b7469 (diff) | |
download | qtlocation-mapboxgl-d7d3d2c7311c5fed79537e39b8c3ea1f954b8ccf.tar.gz |
[core] Fix out-of-bounds array access
Diffstat (limited to 'src')
-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 = |