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

Commit dd949c88 authored by Kichan Kwon's avatar Kichan Kwon
Browse files

Check argument in PowerProfile.getNumCoresInCpuCluster

parent 8526f878
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -392,6 +392,9 @@ public class PowerProfile {
    }

    public int getNumCoresInCpuCluster(int cluster) {
        if (cluster < 0 || cluster >= mCpuClusters.length) {
            return 0; // index out of bound
        }
        return mCpuClusters[cluster].numCpus;
    }