Skip to content

Commit 09e6846

Browse files
committed
Fix empty boot_out.txt
A pointer to the FIL structure was kept after it went out of scope. Apparently this happened to work until cf97793 added the `result` variable that clobbered it. Fixes #5062
1 parent 686103f commit 09e6846

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,13 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
633633

634634
static const char * const boot_py_filenames[] = STRING_LIST("boot.py", "boot.txt");
635635
bool skip_boot_output = false;
636+
#ifdef CIRCUITPY_BOOT_OUTPUT_FILE
637+
FIL file_pointer;
638+
#endif
636639

637640
if (ok_to_run) {
638641

639642
#ifdef CIRCUITPY_BOOT_OUTPUT_FILE
640-
FIL file_pointer;
641643
boot_output_file = &file_pointer;
642644

643645
// Get the base filesystem.

0 commit comments

Comments
 (0)