diff options
| author | Torne (Richard Coles) <torne@google.com> | 2014-08-27 12:36:44 +0100 |
|---|---|---|
| committer | Torne (Richard Coles) <torne@google.com> | 2014-08-27 12:36:44 +0100 |
| commit | 46a807f4eb354a9cdda8dfbcccc1d90c94e3158f (patch) | |
| tree | 55067a8d134e83f847d0514f96a64da6772ac932 | |
| parent | 463a7c3add58c4999952919dacfd29ff3430edf6 (diff) | |
| download | frameworks_base-46a807f4eb354a9cdda8dfbcccc1d90c94e3158f.zip frameworks_base-46a807f4eb354a9cdda8dfbcccc1d90c94e3158f.tar.gz frameworks_base-46a807f4eb354a9cdda8dfbcccc1d90c94e3158f.tar.bz2 | |
Also allow + in stringToFloat.
Some resource files also use a + prefix; allow that as well as -.
Change-Id: I79cf13841849633f8fa49ee7e23698079d890489
| -rw-r--r-- | libs/androidfw/ResourceTypes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp index 3a0b29b..e944ae3 100644 --- a/libs/androidfw/ResourceTypes.cpp +++ b/libs/androidfw/ResourceTypes.cpp @@ -4472,7 +4472,7 @@ bool ResTable::stringToFloat(const char16_t* s, size_t len, Res_value* outValue) if (len > 0) { return false; } - if ((buf[0] < '0' || buf[0] > '9') && buf[0] != '.' && buf[0] != '-') { + if ((buf[0] < '0' || buf[0] > '9') && buf[0] != '.' && buf[0] != '-' && buf[0] != '+') { return false; } |
