summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--supervisor/shared/filesystem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c
index 225dd8d04..d26491721 100644
--- a/supervisor/shared/filesystem.c
+++ b/supervisor/shared/filesystem.c
@@ -73,11 +73,11 @@ static void make_empty_file(FATFS *fatfs, const char *path) {
static void make_sample_code_file(FATFS *fatfs) {
FIL fs;
UINT *char_written = 0;
- const byte buffer[] = "print('Hello World!')";
+ const byte buffer[] = "print('Hello World!')\n";
//Create or modify existing code.py file
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
- f_write(&fs, buffer, sizeof(buffer), char_written);
+ f_write(&fs, buffer, sizeof(buffer) - 1, char_written);
f_close(&fs);
}