Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43f95d5d authored by Johan Redestig's avatar Johan Redestig Committed by Steve Kondik
Browse files

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
parent 2d364c6f
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -685,13 +685,11 @@ bool AaptGroupEntry::getMncName(const char* name,
    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;
}

/*