microbit: Ensure MicroBitFileSystem status flags are always initialized.

Addresses Issue https://github.com/Microsoft/pxt/issues/1682
This commit is contained in:
Joe Finney 2017-04-21 00:23:20 +01:00
parent a85d014382
commit 20cfd2bc3b

View file

@ -119,6 +119,9 @@ uint32_t* MicroBitFileSystem::getFreePage()
*/
MicroBitFileSystem::MicroBitFileSystem(uint32_t flashStart, int flashPages)
{
// Initialise status flags to default value
this->status = 0;
// Attempt tp load an existing filesystem, if it exisits
init(flashStart, flashPages);