mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(GetScheme): fixed potential bug when looking up unknown encryption scheme.
This commit is contained in:
parent
1c5008d799
commit
12df1dcdfd
@ -290,11 +290,9 @@ NextEntry:
|
||||
|
||||
public static ICrypt GetScheme (string scheme)
|
||||
{
|
||||
ICrypt algorithm = NoCryptAlgorithm;
|
||||
if (!string.IsNullOrEmpty (scheme))
|
||||
{
|
||||
KnownSchemes.TryGetValue (scheme, out algorithm);
|
||||
}
|
||||
ICrypt algorithm;
|
||||
if (string.IsNullOrEmpty (scheme) || !KnownSchemes.TryGetValue (scheme, out algorithm))
|
||||
algorithm = NoCryptAlgorithm;
|
||||
return algorithm;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user