ref: c5637a66520aaaa46fc8df8b5fa5cdf7ed26aea9
parent: 6f1bc93673d1ba8a72ae69ca1c19aba88d53e6b3
author: Ori Bernstein <ori@eigenstate.org>
date: Fri Jan 13 23:26:31 EST 2023
pic: error instead of crashing on nonexistent variables
--- a/sys/src/cmd/pic/misc.c
+++ b/sys/src/cmd/pic/misc.c
@@ -370,7 +370,7 @@
static YYSTYPE bug;
struct symtab *stp;
- if (p->o_type != BLOCK) {
+ if (p == NULL || p->o_type != BLOCK) {
ERROR ".%s is not in that block", s WARNING;
return(bug);
}
--
⑨