mirror of
https://github.com/erichelgeson/BlueSCSI.git
synced 2025-04-17 14:38:58 +00:00
Merge pull request #251 from dotsam/fix-debug
Ensure allocLength is defined when needed in onReadBuffer
This commit is contained in:
commit
810eae9be3
@ -1936,6 +1936,9 @@ byte onReadBuffer(SCSI_DEVICE *dev, const byte *cdb)
|
||||
{
|
||||
byte mode = cdb[1] & 7;
|
||||
unsigned m_scsi_buf_size = 0;
|
||||
#if DEBUG > 0
|
||||
uint32_t allocLength = ((uint32_t)cdb[6] << 16) | ((uint32_t)cdb[7] << 8) | cdb[8];
|
||||
#endif
|
||||
|
||||
LOGN("-ReadBuffer");
|
||||
LOGHEXN(mode);
|
||||
@ -1955,7 +1958,6 @@ byte onReadBuffer(SCSI_DEVICE *dev, const byte *cdb)
|
||||
writeDataPhase(4 + m_scsi_buf_size, m_buf);
|
||||
|
||||
#if DEBUG > 0
|
||||
uint32_t allocLength = ((uint32_t)cdb[6] << 16) | ((uint32_t)cdb[7] << 8) | cdb[8];
|
||||
for (unsigned i = 0; i < allocLength; i++) {
|
||||
LOGHEX(m_scsi_buf[i]);LOG(" ");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user