The code before the fix only checked the length of R value of the last signature in the loop, and only for equality (but the length can be less than 32)
The fixed code checks that length of the R value is less than or equal to 32 on each iteration of the loop