Merge pull request #293 from lancaster-university/bugfix-286

Erase scratch pages after use [#286]
This commit is contained in:
Joe Finney 2017-05-27 11:09:19 +01:00 committed by GitHub
commit 89294e4637

View file

@ -499,6 +499,7 @@ int MicroBitFileSystem::recycleBlock(uint16_t block, int type)
// Now refresh the page originally holding the block.
flash.erase_page(page);
flash.flash_write(page, scratch, PAGE_SIZE);
flash.erase_page(scratch);
return MICROBIT_OK;
}