Fixed calculation of row index for insert into section descriptor. [self.formRows count] returns an NSUInteger (unsigned!) If it returns 0, you cannot expect [self.formRows count] -1 to get negative. MAX(0, [self.formRows count] - 1) returns a high positive value instead. Trying to insert a row at this invalid index throws an exception.
Fixed calculation of row index for insert into section descriptor.
[self.formRows count] returns an NSUInteger (unsigned!)
If it returns 0, you cannot expect [self.formRows count] -1 to get
negative.
MAX(0, [self.formRows count] - 1) returns a high positive value instead.
Trying to insert a row at this invalid index throws an exception.

MiMo42/XLForm