Skip to content

Commit

Permalink
Fix (revert) sys_read_term_from_chars/4, re issue #74
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Nov 6, 2022
1 parent f2a5482 commit fd7b9fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -3881,7 +3881,11 @@ static bool fn_sys_read_term_from_chars_4(query *q)
const char *ptr = strstr(src, rest);
size_t off = ptr - src;
size_t len = srclen - off;
check_heap_error(make_slice(q, &tmp, p_chars, off, len));

if (!is_string(p_chars))
check_heap_error(make_string(&tmp, rest));
else
check_heap_error(make_slice(q, &tmp, p_chars, off, len));
} else {
make_atom(&tmp, g_nil_s);
}
Expand Down

0 comments on commit fd7b9fc

Please sign in to comment.