Fix generic-netf

Again and again!
This commit is contained in:
Archi
2022-04-02 16:08:41 +02:00
parent ec78ad1ac2
commit c79c314b20
2 changed files with 8 additions and 0 deletions

View File

@@ -217,7 +217,11 @@ public sealed class ArchiWebHandler : IDisposable {
yield break;
}
#if NETFRAMEWORK
if (response.Content.TotalInventoryCount > 0X7FFFFFC7) {
#else
if (response.Content.TotalInventoryCount > Array.MaxLength) {
#endif
throw new InvalidOperationException(nameof(response.Content.TotalInventoryCount));
}

View File

@@ -153,7 +153,11 @@ public sealed class WebBrowser : IDisposable {
}
}
#if NETFRAMEWORK
if (response.Length > 0X7FFFFFC7) {
#else
if (response.Length > Array.MaxLength) {
#endif
throw new InvalidOperationException(nameof(response.Length));
}