git: 9front

Download patch

ref: c233d12b0ea354de7296434f9abbf840306a6703
parent: ec30865e71d30d7bbd02f4fb766978dfb4ef115e
author: Sigrid <ftrvxmtrx@gmail.com>
date: Thu Aug 20 04:28:24 EDT 2020

libaml: fix fault when the second operand of comparison cannot be converted

--- a/sys/src/libaml/aml.c
+++ b/sys/src/libaml/aml.c
@@ -1524,7 +1524,7 @@
 		tag = TAG(a);
 		if(b == nil || TAG(b) != tag)
 			b = copy(tag, b);
-		if(TAG(b) != tag)
+		if(b == nil || TAG(b) != tag)
 			return -1;	/* botch */
 		switch(tag){
 		default:
--