summaryrefslogtreecommitdiff
path: root/6/isel.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-15 02:11:20 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-15 02:11:20 -0800
commit2212714411ce559905b48a82f81770995bd656a7 (patch)
tree0c91599eaf62490e8f197c78e9606c57610bfc6a /6/isel.c
parent859d8c8282bff77c84a73ab61d55c3532e667590 (diff)
downloadmc-2212714411ce559905b48a82f81770995bd656a7.tar.gz
Don't die on zero sized structs.
Diffstat (limited to '6/isel.c')
-rw-r--r--6/isel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/6/isel.c b/6/isel.c
index fa8bbfe..20f3b82 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -409,6 +409,8 @@ static void blit(Isel *s, Loc *to, Loc *from, size_t dstoff, size_t srcoff, size
Loc *tmp, *src, *dst; /* source memory, dst memory */
assert(szmodes[align] != ModeNone); /* make sure we have a valid alignment */
+ if (!sz)
+ return;
sp = inr(s, from);
dp = inr(s, to);