added more code struct manipulation code
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-12-28 00:27:27 +09:00
parent ce4c583773
commit 007a6c6b48
7 changed files with 151 additions and 100 deletions

View File

@ -58,6 +58,7 @@ int hcl_decode (hcl_t* hcl, const hcl_code_t* code, hcl_oow_t start, hcl_oow_t e
/* the instruction at the offset 'end' is not decoded.
* decoding offset range is from start to end - 1. */
if (!code) code = &hcl->code;
HCL_ASSERT (hcl, start >= 0 && end >= 0);
HCL_ASSERT (hcl, code->bc.len < HCL_SMOOI_MAX); /* asserted by the compiler */