Make AM registers into an array

This commit is contained in:
2025-08-10 20:30:07 +01:00
parent 52a42d2937
commit 57c39fd00b
14 changed files with 311 additions and 288 deletions

View File

@@ -4,12 +4,12 @@
size_t print(am_t *am, char *buffer, size_t buffer_size)
{
assert(am->val->is_atom);
assert(am->val->atom.type == ATOM_TYPE_INTEGER);
assert(AM_VAL(am)->is_atom);
assert(AM_VAL(am)->atom.type == ATOM_TYPE_INTEGER);
size_t i = 0;
int64_t value = am->val->atom.integer;
int64_t value = AM_VAL(am)->atom.integer;
if (value < 0) {
buffer[i++] = '-';
value *= -1;