summaryrefslogtreecommitdiffstats
path: root/libs/androidfw
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2014-08-26 17:23:19 -0700
committerDeepanshu Gupta <deepanshu@google.com>2014-08-26 17:23:19 -0700
commit71909a62c532628e0332604aaceff1ec30d5ecbd (patch)
tree2d9f97b6bfb64a1322bb4ec45117ada056fab61c /libs/androidfw
parent8907a0eebe21f8c736de0c4282a55456fa880d8b (diff)
downloadframeworks_base-71909a62c532628e0332604aaceff1ec30d5ecbd.zip
frameworks_base-71909a62c532628e0332604aaceff1ec30d5ecbd.tar.gz
frameworks_base-71909a62c532628e0332604aaceff1ec30d5ecbd.tar.bz2
Fix invalid conditional check in ResourceTypes.
The check was always false. This wasn't really a problem since the regex check later took care of it. But it's just wrong to leave such mistakes in the code once they are noticed. Change-Id: Id3dd602318d8c64d466bd0f102aa3af0a1c80189
Diffstat (limited to 'libs/androidfw')
-rw-r--r--libs/androidfw/ResourceTypes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index 239d682..441b090 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -4453,7 +4453,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] != '.') {
+ if ((buf[0] < '0' || buf[0] > '9') && buf[0] != '.') {
return false;
}