From aca4ab6f62c62befaccbb43bea7c6090102152af Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 14 Jun 2020 15:13:27 +0100 Subject: [PATCH] Stop checking RW subchannel once it has been found to contain data. --- Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs index cb47a4c26..9061600fb 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Subchannel.cs @@ -116,15 +116,19 @@ namespace Aaru.Core.Devices.Dumping pOk = false; for(int w = 0; w < 8; w++) - { if(((deSub[p] >> w) & 1) > 0) pWeight++; - } } for(int rw = subPos + 24; rw < subPos + 96; rw++) - if(deSub[rw] != 0) - rwOk = false; + { + if(deSub[rw] == 0) + continue; + + rwOk = false; + + break; + } bool rwPacket = false; bool cdtextPacket = false;