commit | 5ef0b9d72451d4bb65f5a76a05738041ed15664a | [log] [tgz] |
---|---|---|
author | Johan Redestig <johan.redestig@sonyericsson.com> | Tue Nov 09 14:13:31 2010 +0100 |
committer | Johan Redestig <johan.redestig@sonyericsson.com> | Tue Jan 04 07:30:32 2011 +0100 |
tree | 065e751966b6e14ad3483c409139f6fd85be04c5 | |
parent | 69ebb984f230a523dc316bdb2c9e9c28111364fd [diff] [blame] |
Make AaptGroupEntry::getMncName accept mnc00 MNC 00 is a valid network code and is used by some operators, see http://en.wikipedia.org/wiki/Mobile_Network_Code. Remove the test that checks if atoi returns zero. The string is validated to contain only numbers already. Also discussed here: https://code.google.com/p/android/issues/detail?id=3657 Change-Id: I3220d7980abe4067c9e7aa4cbc10b5fd0b8c9ea7
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp index e4f447e..2b2ec7b 100644 --- a/tools/aapt/AaptAssets.cpp +++ b/tools/aapt/AaptAssets.cpp
@@ -685,13 +685,11 @@ if (*c != 0) return false; if (c-val == 0 || c-val > 3) return false; - int d = atoi(val); - if (d != 0) { - if (out) out->mnc = d; - return true; + if (out) { + out->mnc = atoi(val); } - return false; + return true; } /*