Check if we exhausted the instance buffer prior to copying underlines

This fixes another potential segfault.
9c33790809Antonio Scandurra committed on 1/17/2024, 8:50:55 AMparent97bd3e1
1 file changedLine totals unavailable