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

Commit 5ef0b9d7 authored by Johan Redestig's avatar Johan Redestig
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 69ebb984
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -685,13 +685,11 @@ bool AaptGroupEntry::getMncName(const char* name,
    if (*c != 0) return false;
    if (*c != 0) return false;
    if (c-val == 0 || c-val > 3) return false;
    if (c-val == 0 || c-val > 3) return false;


    int d = atoi(val);
    if (out) {
    if (d != 0) {
        out->mnc = atoi(val);
        if (out) out->mnc = d;
        return true;
    }
    }


    return false;
    return true;
}
}


/*
/*