fix a handful of places where I either didn't guard against underflows or null pointers; add test cases for them in crash.t

This commit is contained in:
david parsons
2023-12-11 19:42:37 -08:00
parent a096c1a3aa
commit 6fbfeb9116
9 changed files with 114 additions and 46 deletions
+2
View File
@@ -160,7 +160,9 @@ uniquename(ParagraphRoot *pr, Cstring *name)
CREATE(label);
RESERVE(label, suffix + 200);
strcpy(T(label), T(*name));
S(label) = S(*name);
decollide(T(*pr), &label, suffix);