Fix netf brain damage

This commit is contained in:
Archi
2022-04-06 14:05:10 +02:00
parent f95b6bf089
commit 1eabe3a5ed
2 changed files with 5 additions and 3 deletions

View File

@@ -3533,7 +3533,9 @@ public sealed class Bot : IAsyncDisposable {
if (!string.IsNullOrEmpty(steamParentalCode)) {
byte i = 0;
byte[] password = new byte[steamParentalCode.Length];
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
byte[] password = new byte[steamParentalCode!.Length];
foreach (char character in steamParentalCode.TakeWhile(static character => character is >= '0' and <= '9')) {
password[i++] = (byte) character;

View File

@@ -37,7 +37,6 @@ using ArchiSteamFarm.Localization;
using ArchiSteamFarm.Steam.Data;
using ArchiSteamFarm.Steam.Exchange;
using ArchiSteamFarm.Steam.Security;
using ArchiSteamFarm.Steam.Storage;
using ArchiSteamFarm.Storage;
using ArchiSteamFarm.Web;
using ArchiSteamFarm.Web.Responses;
@@ -2228,7 +2227,8 @@ public sealed class ArchiWebHandler : IDisposable {
// Unlock Steam Parental if needed
if (!string.IsNullOrEmpty(parentalCode)) {
if (!await UnlockParentalAccount(parentalCode).ConfigureAwait(false)) {
// ReSharper disable once RedundantSuppressNullableWarningExpression - required for .NET Framework
if (!await UnlockParentalAccount(parentalCode!).ConfigureAwait(false)) {
return false;
}
}