Skip to content

Commit 5823f5e

Browse files
committed
Add \n to file end
1 parent a0ef667 commit 5823f5e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

supervisor/shared/filesystem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ static void make_empty_file(FATFS *fatfs, const char *path) {
7373
static void make_sample_code_file(FATFS *fatfs) {
7474
FIL fs;
7575
UINT *char_written = 0;
76-
const byte buffer[] = "print('Hello World!')";
76+
const byte buffer[] = "print('Hello World!')\n";
7777

7878
//Create or modify existing code.py file
7979
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
80-
f_write(&fs, buffer, sizeof(buffer), char_written);
80+
f_write(&fs, buffer, sizeof(buffer) - 1, char_written);
8181
f_close(&fs);
8282
}
8383

0 commit comments

Comments
 (0)