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
This commit is contained in:
Christian Walther 2021-08-02 23:38:23 +02:00
parent 686103fd8e
commit 09e6846135

4
main.c
View File

@ -633,11 +633,13 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
static const char * const boot_py_filenames[] = STRING_LIST("boot.py", "boot.txt");
bool skip_boot_output = false;
#ifdef CIRCUITPY_BOOT_OUTPUT_FILE
FIL file_pointer;
#endif
if (ok_to_run) {
#ifdef CIRCUITPY_BOOT_OUTPUT_FILE
FIL file_pointer;
boot_output_file = &file_pointer;
// Get the base filesystem.