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

Commit fc25c1e2 authored by Victoria Lease's avatar Victoria Lease Committed by Gerrit - the friendly Code Review server
Browse files

malloc some advances

Bug: 13506939
Change-Id: I87ad616960c4f16bc55d8b906049dbd4f001d6a5
parent 1d4271ff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -565,7 +565,7 @@ public:
                return 0;
            }
        }
        jfloat advancesArray[count];
        jfloat* advancesArray = new jfloat[count];
        jfloat totalAdvance = 0;

        TextLayout::getTextRunAdvances(paint, text, start, count, contextCount, flags,
@@ -574,6 +574,7 @@ public:
        if (advances != NULL) {
            env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray);
        }
        delete [] advancesArray;
        return totalAdvance;
    }