Skip to content

Commit

Permalink
fix: when copying filename, use filename argument of file info
Browse files Browse the repository at this point in the history
  • Loading branch information
uyjulian committed Jan 19, 2024
1 parent d29a4e0 commit a76c038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ee/libcglue/src/ps2sdkapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int __fioOpenHelper(_libcglue_fdman_fd_info_t *info, const char *buf, int flags,
return -ENOMEM;
}
userdata->fd = iop_fd;
memcpy(userdata, buf, buf_len);
memcpy(userdata->filename, buf, buf_len);
userdata->filename[buf_len] = '\x00';
info->userdata = (void *)userdata;
info->ops = is_dir ? &__fio_fdman_ops_dir : &__fio_fdman_ops_file;
Expand Down
2 changes: 1 addition & 1 deletion ee/rpc/filexio/src/fileXio_ps2sdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int __fileXioOpenHelper(_libcglue_fdman_fd_info_t *info, const char *buf, int fl
return -ENOMEM;
}
userdata->fd = iop_fd;
memcpy(userdata, buf, buf_len);
memcpy(userdata->filename, buf, buf_len);
userdata->filename[buf_len] = '\x00';
info->userdata = (void *)userdata;
info->ops = is_dir ? &__fileXio_fdman_ops_dir : &__fileXio_fdman_ops_file;
Expand Down

0 comments on commit a76c038

Please sign in to comment.