Skip to content

Commit

Permalink
fixup! Add support to new atom chunk format introduced with OTP-28
Browse files Browse the repository at this point in the history
  • Loading branch information
bettio committed Feb 13, 2025
1 parent b193643 commit bbd87a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libAtomVM/atom_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,11 @@ int atom_table_ensure_atoms(struct AtomTable *table, const void *atoms, int coun

if (is_long_format) {
uint8_t *atom_copy = malloc(atom_len + 1);
if (IS_NULL_PTR(atom_copy)) {
// we are not going to remove atoms that have already been added up to this one
SMP_UNLOCK(table);
return ATOM_TABLE_ALLOC_FAIL;
}
atom_copy[0] = atom_len;
memcpy(atom_copy + 1, to_be_copied, atom_len);
current_atom = atom_copy;
Expand Down

0 comments on commit bbd87a2

Please sign in to comment.