segment: Fix read past end of buffer when input ends in '-'.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Oct 2021 16:13:40 +0000 (09:13 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Oct 2021 16:13:40 +0000 (09:13 -0700)
commit4ec7a639f968227b4be247d21b2c1e46743411db
tree522e4663d93efee2ead80b18f67cbd55a86d7547
parentbc0434f1ced83fc3a5f5ace44cbad3acdc5e3e29
segment: Fix read past end of buffer when input ends in '-'.

Thanks to John Darrington for reporting this.
Found by Address Sanitizer.
src/language/lexer/segment.c