Skip to content

Commit

Permalink
Fix a rare crash during quick paging.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed Feb 28, 2025
1 parent 8867c87 commit cb5c787
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/eepp/ui/doc/documentview.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ enum class LineWrapType { Viewport, LineBreakingColumn };
enum class VisibleIndex : Int64 { first = 0, invalid = std::numeric_limits<Int64>::max() };

inline VisibleIndex visibleIndexOffset( VisibleIndex idx, Int64 offset ) {
return static_cast<VisibleIndex>( static_cast<Int64>( idx ) + offset );
return eemax( VisibleIndex::first,
static_cast<VisibleIndex>( static_cast<Int64>( idx ) + offset ) );
}

class EE_API DocumentView {
Expand Down

0 comments on commit cb5c787

Please sign in to comment.