Skip to content

Commit

Permalink
fixup! sfdp: Implemented a validation step for the SFDP Basic Paramet…
Browse files Browse the repository at this point in the history
…er Table Header
  • Loading branch information
dragonmux committed Dec 10, 2023
1 parent b942a4d commit 40a5593
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sfdp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -285,25 +285,25 @@ namespace bmpflash::sfdp
{
console.warn("Adjusting table version number to correct"sv);
// 24 uint32_t's -> v1.8
if (expectedLength == 96U)
if (actualLength == 96U)
{
versionMajor = 1U;
versionMinor = 8U;
}
// 21 uint32_t's -> v1.7
else if (expectedLength == 84U)
else if (actualLength == 84U)
{
versionMajor = 1U;
versionMinor = 7U;
}
// 16 uint32_t's -> v1.6 (assume the newer standard)
else if (expectedLength == 64U)
else if (actualLength == 64U)
{
versionMajor = 1U;
versionMinor = 6U;
}
// 9 uint32_t's -> v1.4 (assume the newer standard)
else if (expectedLength == 36U)
else if (actualLength == 36U)
{
versionMajor = 1U;
versionMinor = 4U;
Expand Down

0 comments on commit 40a5593

Please sign in to comment.