summaryrefslogtreecommitdiff
path: root/berry_fix/payload/src/flash.c
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-11-07 18:06:37 -0500
committerluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-11-07 18:06:37 -0500
commita29b18ed2f27c2991b0894a69fa04738ba9522ca (patch)
tree4db08c6d6a2d585a0a42ee6f023faa9f6e8d13fb /berry_fix/payload/src/flash.c
parent8d2d34aae9767f283b3c34140920828e37540d23 (diff)
parent8b1c2c946b3b58cc938f0496a9af11a641749a1e (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald
Diffstat (limited to 'berry_fix/payload/src/flash.c')
-rw-r--r--berry_fix/payload/src/flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/berry_fix/payload/src/flash.c b/berry_fix/payload/src/flash.c
index 499a1f971..1f09d0b8f 100644
--- a/berry_fix/payload/src/flash.c
+++ b/berry_fix/payload/src/flash.c
@@ -296,7 +296,7 @@ u8 HandleWriteSectorNBytes(u8 sectorNum, u8 *data, u16 size)
u8 TryWriteSector(u8 sectorNum, u8 *data)
{
- if (ProgramFlashSectorAndVerify(sectorNum, data)) // is damaged?
+ if (ProgramFlashSectorAndVerify(sectorNum, data) != 0) // is damaged?
{
SetSectorDamagedStatus(SECTOR_DAMAGED, sectorNum); // set damaged sector bits.
return SAVE_STATUS_ERROR;