mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fixed overflow exception in alphanum comparer
This commit is contained in:
parent
25db52003c
commit
ce51973a80
@ -78,8 +78,14 @@ namespace MediaBrowser.Server.Implementations.Sorting
|
|||||||
// If both chunks contain numeric characters, sort them numerically
|
// If both chunks contain numeric characters, sort them numerically
|
||||||
if (char.IsDigit(thisChunk[0]) && char.IsDigit(thatChunk[0]))
|
if (char.IsDigit(thisChunk[0]) && char.IsDigit(thatChunk[0]))
|
||||||
{
|
{
|
||||||
thisNumericChunk = Convert.ToInt32(thisChunk.ToString());
|
if (!int.TryParse(thisChunk.ToString(), out thisNumericChunk))
|
||||||
thatNumericChunk = Convert.ToInt32(thatChunk.ToString());
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (!int.TryParse(thatChunk.ToString(), out thatNumericChunk))
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (thisNumericChunk < thatNumericChunk)
|
if (thisNumericChunk < thatNumericChunk)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user