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

Commit 8dc1c727 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

WriterTest: Fix bounds check

Because of 0-based indexing, we need to make sure the index is
not equal to the number of elements in the array.

Test: TreeHugger
Change-Id: I9662d4a67cdfebb0c890c65a35a2456cd3af001b
parent bcb85772
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ int32_t WriterTest::addWriterSource(bool isAudio, configFormat params) {

void getFileDetails(string &inputFilePath, string &info, configFormat &params, bool &isAudio,
                    int32_t streamIndex = 0) {
    if (streamIndex > sizeof(kInputData) / sizeof(kInputData[0])) {
    if (streamIndex >= sizeof(kInputData) / sizeof(kInputData[0])) {
        return;
    }
    inputFilePath += kInputData[streamIndex].inputFile;