Skip to content

fixed an overflow error caused by choosing too small a type to store variables#4

Open
raabh wants to merge 1 commit intocrillab:mainfrom
raabh:literal-storing-size-bugfix
Open

fixed an overflow error caused by choosing too small a type to store variables#4
raabh wants to merge 1 commit intocrillab:mainfrom
raabh:literal-storing-size-bugfix

Conversation

@raabh
Copy link

@raabh raabh commented Jul 30, 2023

Here is, in my best belief, the solution to the overflow bug. Depending on the number of variables, d4v2 chooses an appropriate type to save RAM.

It loses one bit because d4v2 encodes variables in unsigned types but adds the sign by hand afterward. Hence, d4v2 needs to "upgrade" to the next bigger type earlier.

This should fix my recently opened issue

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