Skip to content

Commit

Permalink
append end of string in user program
Browse files Browse the repository at this point in the history
  • Loading branch information
niklauslee committed Dec 14, 2021
1 parent ba7b7ce commit e85b315
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/prog.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@ int km_prog_write(uint8_t *buffer, int size) {
}

int km_prog_end() {
// push end of string
page_buffer_push(0);

// flush if buffer has data
if (page_written > 0) {
int ret = page_buffer_flush();
if (ret < 0) return -1;
}

if (page_buffer != NULL) {
free(page_buffer);
}
Expand Down

0 comments on commit e85b315

Please sign in to comment.