commit b65a6892ddf9256e963df1f0818f22ca09f6b75b
parent 542d89bcd50a0dd43a490180547c88312bf0c7a6
Author: Ori Bernstein <ori@eigenstate.org>
Date: Sun, 28 Feb 2016 20:47:24 -0800
Error properly on strings.
Don't print junk when we don't have 'b' for a string.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lisc/emit.c b/lisc/emit.c
@@ -559,6 +559,8 @@ emitdat(Dat *d, FILE *f)
}
/* fallthrough */
default:
+ if (d->isstr)
+ err("strings only supported for 'b' currently");
if (d->isref)
fprintf(f, "%s %s+%"PRId64"\n", dtoa[d->type], d->u.ref.nam, d->u.ref.off);
else