metaborg / mb-rep

Apache License 2.0
2 stars 4 forks source link

StrategoAppl: Fix off-by-one bounds check #2

Closed Balletie closed 8 years ago

Balletie commented 8 years ago

I encountered this bug when trying to update paplj to the new dynsem implementation. It called getSubterm with 0 as its argument, but it threw an ArrayIndexOutOfBoundsException. So it got to line 56 (i.e. return kids[index]) despite being out of bounds.

I searched for other off-by-one bound checks but could not find one.

hendrikvanantwerpen commented 8 years ago

Thanks!