c
< 	if (row != 0)
---
> 	if (row != 0 && row - 1 < nused)
