Skip to content

Commit

Permalink
fix: fileio - return number of written bytes in append
Browse files Browse the repository at this point in the history
  • Loading branch information
nalgeon committed Feb 7, 2023
1 parent 1ac7578 commit 8414efa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fileio/legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ static void fileio_append(sqlite3_context* ctx, int argc, sqlite3_value** argv)
return;
}

sqlite3_result_int(ctx, rc);
size_t n = strlen(str);
sqlite3_result_int(ctx, n);

if (is_new_file) {
sqlite3_set_auxdata(ctx, 0, file, (void (*)(void*))fclose);
Expand Down

0 comments on commit 8414efa

Please sign in to comment.