summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-10-09 16:26:22 -0700
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-10-12 12:21:00 -0700
commit8bccf657e9cecb58d5b349dac48c0a50db813e91 (patch)
tree8da6a230f235ed5e59446ee36cfe24847fd75bda /src
parent057cc80fc45758e89bfa08eb1ce0df487dc002a6 (diff)
downloadqtlocation-mapboxgl-8bccf657e9cecb58d5b349dac48c0a50db813e91.tar.gz
[core] Fix out-of-bounds array access
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/util/i18n.cpp2
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 =