@Fernando
in Values.CRVal, line 102:
Code:
public CValue getValue(int n)
{
if (rvValues[n]==null)
{
rvValues[n]=new CValue();
}
return rvValues[n];
}
line 104 will throw exception when n is greater than 26 while using 'unlimited alterable values' before setting it, as android only read value numbers in cob, defined in edittime.
A quick fix is adding check before retrieving, and copy old values to re-allocated one, just like realloc in Cpp:
Code:
public CValue getValue(int n) {
if(n >= rvValues.length){
// int oldLength = rvValues.length;
// CValue[] oldValues = rvValues;
// rvValues = new CValue[n];
// // Copy old values, equals to realloc
// System.arraycopy(oldValues, 0, rvValues, 0, oldLength);
// or...
extendValues(n);
}
// if (rvValues[n]==null)
// {
// rvValues[n]=new CValue();
// }
return rvValues[n];
}
the same fix is also need in getString, etc.