ref: 7f4889e9fca99864162b0b66c6e407f467a65ccb
parent: ee346d2725b7ff367f5e3e76aa52577f0311b640
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Jun 25 11:42:37 EDT 2015
The plan 9 assemblers don't like zero sized things. Don't generate ref blobs for empties.
--- a/6/blob.c
+++ b/6/blob.c
@@ -150,7 +150,10 @@
lbl = genlocallblstr(buf, sizeof buf);
htput(strtab, &v->lit.strval, strdup(lbl));
}
- b(seq, mkblobref(lbl, 0, 1));
+ if (v->lit.strval.len > 0)
+ b(seq, mkblobref(lbl, 0, 1));
+ else
+ b(seq, mkblobi(Bti64, 0));
b(seq, mkblobi(Bti64, v->lit.strval.len));
break;
case Lfunc: