mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-10 21:54:23 +00:00
Use string indices
This commit is contained in:
@@ -78,6 +78,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
||||||
|
<PackageReference Include="IndexRange" Version="1.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.HttpOverrides" Version="2.2.0" />
|
||||||
|
|||||||
@@ -929,7 +929,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
string name = parsedArgs[0];
|
string name = parsedArgs[0];
|
||||||
string key = parsedArgs[parsedArgs.Length - 1];
|
string key = parsedArgs[^1];
|
||||||
|
|
||||||
gamesToRedeemInBackground[key] = name;
|
gamesToRedeemInBackground[key] = name;
|
||||||
}
|
}
|
||||||
@@ -1634,7 +1634,7 @@ namespace ArchiSteamFarm {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
string key = parsedArgs[parsedArgs.Length - 1];
|
string key = parsedArgs[^1];
|
||||||
|
|
||||||
if (!Utilities.IsValidCdKey(key)) {
|
if (!Utilities.IsValidCdKey(key)) {
|
||||||
ArchiLogger.LogGenericWarning(string.Format(Strings.ErrorIsInvalid, key));
|
ArchiLogger.LogGenericWarning(string.Format(Strings.ErrorIsInvalid, key));
|
||||||
|
|||||||
@@ -387,7 +387,7 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The last 4 bits of the mac say where the code starts
|
// The last 4 bits of the mac say where the code starts
|
||||||
int start = hash[hash.Length - 1] & 0x0f;
|
int start = hash[^1] & 0x0f;
|
||||||
|
|
||||||
// Extract those 4 bytes
|
// Extract those 4 bytes
|
||||||
byte[] bytes = new byte[4];
|
byte[] bytes = new byte[4];
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace ArchiSteamFarm {
|
|||||||
|
|
||||||
string[] args = text.Split((char[]) null, argsToSkip + 1, StringSplitOptions.RemoveEmptyEntries);
|
string[] args = text.Split((char[]) null, argsToSkip + 1, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
return args[args.Length - 1];
|
return args[^1];
|
||||||
}
|
}
|
||||||
|
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
|
|||||||
Reference in New Issue
Block a user