Fix off-by-one error in assert.
Change-Id: I86447c747a212175be560170378c655ac801f5a6
This commit is contained in:
parent
8ee0647365
commit
b585e2e324
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue