summaryrefslogtreecommitdiff
path: root/supervisor/shared/filesystem.c
diff options
context:
space:
mode:
authorAyan Pahwa <iayanpahwa@gmail.com>2019-11-23 20:47:30 +0530
committerAyan Pahwa <iayanpahwa@gmail.com>2019-11-23 20:47:30 +0530
commit262cfd4ea3f80697baf8ca2ccfe63ec243c02870 (patch)
tree374bcaf53c6f20428e0dd7346865af906e02dda0 /supervisor/shared/filesystem.c
parent5823f5ed04d9a213d5aed463cc157dc93abb4050 (diff)
Passing address of char_written at f_write
Diffstat (limited to 'supervisor/shared/filesystem.c')
-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 d26491721..261c48172 100644
--- a/supervisor/shared/filesystem.c
+++ b/supervisor/shared/filesystem.c
@@ -72,12 +72,12 @@ static void make_empty_file(FATFS *fatfs, const char *path) {
static void make_sample_code_file(FATFS *fatfs) {
FIL fs;
- UINT *char_written = 0;
+ UINT char_written = 0;
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) - 1, char_written);
+ f_write(&fs, buffer, sizeof(buffer) - 1, &char_written);
f_close(&fs);
}