mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 13:48:57 +08:00
(GetScheme): fixed potential bug when looking up unknown encryption scheme.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user