Unverified Commit c4f36170 authored by erpebe's avatar erpebe Committed by GitHub

Correct calculation of totalBlocks() in SD.h and SDFS.h (#1899)

parent 3068cd0a
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
} }
size_t totalBlocks() { size_t totalBlocks() {
return (totalClusters() / blocksPerCluster()); return (totalClusters() * blocksPerCluster());
} }
size_t clusterSize() { size_t clusterSize() {
......
...@@ -183,7 +183,7 @@ public: ...@@ -183,7 +183,7 @@ public:
return _fs.vol()->clusterCount(); return _fs.vol()->clusterCount();
} }
size_t totalBlocks() { size_t totalBlocks() {
return (totalClusters() / blocksPerCluster()); return (totalClusters() * blocksPerCluster());
} }
size_t clusterSize() { size_t clusterSize() {
return _fs.vol()->bytesPerCluster(); return _fs.vol()->bytesPerCluster();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment