Make showing caret in error reporting more robust
commit6392f0c794e5e3d4c9212dc8a6a02eea8f982dff
authorOlly Betts <olly@survex.com>
Sat, 4 May 2024 21:51:35 +0000 (5 09:51 +1200)
committerOlly Betts <olly@survex.com>
Sat, 4 May 2024 21:51:35 +0000 (5 09:51 +1200)
tree1b91f3e18a2152c72f6fa4066f960c9820f24ca1
parent2cca7b87ddda26255d5c566b91979f97ba4f0e42
Make showing caret in error reporting more robust

If due to a bug elsewhere we calculated a negative column offset, then
we'd print billions of spaces when trying to position the caret.
Noticed while developing on a branch - as far as I know this has never
happened in a released version.

Now a negative column offset is treated like zero and we don't try to
show the caret should this happen.
src/datain.c