Skip to content

Conversation

EFCniux
Copy link

@EFCniux EFCniux commented Feb 24, 2025

Removed Int.MAX_VALUE from nextOffset as it could lead to an int overflow

Fixes an issue where

val diff = nextOffset - spacing + beforePadding - stickyPadding

given
nextOffset = 2147483647
spacing = 0
beforePadding = 24
stickyPadding = 12

will result in
diff = -2147483637

Because the diff calculation overflows

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