Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into exdschema_support
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcintyre committed Oct 21, 2023
2 parents b66fd36 + 48c15e2 commit dcdb077
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Lumina/Excel/ExcelSheetImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,14 @@ internal void GenerateFilePages()
/// <returns>The <see cref="ExcelPage"/> if found, null otherwise</returns>
public ExcelPage? GetPageForRow( uint row )
{
return DataPages.FirstOrDefault( s => s.RowData.ContainsKey( row ) );
var page = DataPages.FirstOrDefault( s => row >= s.StartId && row < s.StartId + s.RowCount );

if( page?.RowData.ContainsKey( row ) == false )
{
return null;
}

return page;
}

/// <summary>
Expand Down

0 comments on commit dcdb077

Please sign in to comment.