modify FLASH search algorithm
Merge pull request #228 from senda-akiha/bugfix/error-flash

modify FLASH search algorithm