Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions system/lib/wasmfs/js_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int _wasmfs_read_file(const char* path, uint8_t** out_buf, off_t* out_size) {

// Writes to a file, possibly creating it, and returns the number of bytes
// written successfully. If the file already exists, appends to it.
int _wasmfs_write_file(const char* pathname, char* data, size_t data_size) {
int _wasmfs_write_file(const char* pathname, const uint8_t* data, size_t data_size) {
auto parsedParent = path::parseParent(pathname);
if (parsedParent.getError()) {
return 0;
Expand Down Expand Up @@ -100,7 +100,7 @@ int _wasmfs_write_file(const char* pathname, char* data, size_t data_size) {
}

auto offset = lockedFile.getSize();
auto result = lockedFile.write((uint8_t*)data, data_size, offset);
auto result = lockedFile.write(data, data_size, offset);
if (result != __WASI_ERRNO_SUCCESS) {
return 0;
}
Expand Down
Loading