projects
/
platform
/
upstream
/
libphonenumber.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix bug in AsYouTypeFormatter where we hit a IndexOutOfBoundsException in its Java...
[platform/upstream/libphonenumber.git]
/
cpp
/
src
/
phonenumbers
/
asyoutypeformatter.cc
diff --git
a/cpp/src/phonenumbers/asyoutypeformatter.cc
b/cpp/src/phonenumbers/asyoutypeformatter.cc
index
97770db
..
422d568
100644
(file)
--- a/
cpp/src/phonenumbers/asyoutypeformatter.cc
+++ b/
cpp/src/phonenumbers/asyoutypeformatter.cc
@@
-466,6
+466,9
@@
void AsYouTypeFormatter::AttemptToChoosePatternWithPrefixExtracted(
able_to_format_ = true;
is_expecting_country_code_ = false;
possible_formats_.clear();
+ last_match_position_ = 0;
+ formatting_template_.remove();
+ current_formatting_pattern_.clear();
AttemptToChooseFormattingPattern(formatted_number);
}