mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Invert 'if' statement to reduce nesting.
This commit is contained in:
@@ -187,7 +187,9 @@ namespace DiscImageChef.Decoders.CD
|
||||
byte[] scrambled = new byte[sector.Length];
|
||||
for(int i = 0; i < 2352; i++) scrambled[i] = (byte)(sector[i] ^ ScrambleTable[i]);
|
||||
|
||||
if(sector.Length > 2352) for(int i = 2352; i < sector.Length; i++) scrambled[i] = sector[i];
|
||||
if(sector.Length <= 2352) return scrambled;
|
||||
|
||||
for(int i = 2352; i < sector.Length; i++) scrambled[i] = sector[i];
|
||||
|
||||
return scrambled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user