Skip to content

Fix more panics following PR #51 - #52

Open
toomim wants to merge 2 commits into
josephg:masterfrom
braid-org:decode-panics
Open

Fix more panics following PR #51#52
toomim wants to merge 2 commits into
josephg:masterfrom
braid-org:decode-panics

Conversation

@toomim

@toomim toomim commented Aug 11, 2026

Copy link
Copy Markdown

From #51:

I've fixed all the panics that this test found. I suspect there are more lurking around - might be good to strengthen this test.

Here are fixes to some more that were lurking. Strengthened the test too. It now
tests byte replacement, deletion and truncation as well as insertion, over three
shapes of document instead of one.

One of the fixes is to the #51 fix itself. The n == 0 guard on local parents
rejects a zero offset, but next_time - n still underflows when n is larger
than next_time.

The wasm part is separated into its own commit because it changes a visible JS API: fromBytes used to unwrap, creating an illegible fault. Now it throws.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant