[apps/regression] Add index assertions

This commit is contained in:
Léa Saviot
2018-12-13 12:05:28 +01:00
committed by EmilieNumworks
parent ebeb8e2022
commit 11c0b02b7b

View File

@@ -46,8 +46,10 @@ void GraphView::drawRect(KDContext * ctx, KDRect rect) const {
char * GraphView::label(Axis axis, int index) const {
if (axis == Axis::Vertical) {
assert(index < k_maxNumberOfXLabels);
return (char *)m_yLabels[index];
}
assert(index < k_maxNumberOfYLabels);
return (char *)m_xLabels[index];
}