Commit 7c3004b
authored
Fix freeze bug in FlashKeyValue.ino
The old version contained code like this: Serial.println("FlashIAP block device size: " + blockDevice.size());
This adds a large number (the block device size) to the address of the string literal before the + sign. It becomes an illegal address, which triggers a BusFault exception, and the sketch freezes after printing "FlashIAPBlockDevice + TDBStore Test."1 parent 8c3aebe commit 7c3004b
File tree
1 file changed
+8
-4
lines changed- examples/Creating a Flash-Optimised Key-Value Store/FlashKeyValue
1 file changed
+8
-4
lines changedLines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
0 commit comments