Fix off-by-one error in assert.

Change-Id: I86447c747a212175be560170378c655ac801f5a6
This commit is contained in:
Tim Newsome 2016-11-19 15:40:49 -08:00
parent 8ee0647365
commit b585e2e324
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ unsigned as_compile(struct algorithm_steps *as, uint8_t *target,
if (!finish_early) if (!finish_early)
as->steps[s][0] = STEP_NOP; as->steps[s][0] = STEP_NOP;
} }
assert(offset + 1 < target_size); assert(offset + 1 <= target_size);
target[offset++] = STEP_EXIT; target[offset++] = STEP_EXIT;
LOG_DEBUG("%d-byte program:", offset); LOG_DEBUG("%d-byte program:", offset);