Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cellSave fix plus bugfixes #2631

Merged
merged 4 commits into from Apr 5, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions rpcs3/Emu/Cell/Modules/cellSaveData.cpp
Expand Up @@ -307,6 +307,10 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
return CELL_OK; // ???
}
}
if ((result->result == CELL_SAVEDATA_CBRESULT_OK_LAST) || (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST_NOCONFIRM))
{
return CELL_OK;
}
}

if (funcFixed)
Expand Down Expand Up @@ -338,6 +342,10 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
{
save_entry.dirName = fixedSet->dirName.get_ptr();
}
if ((result->result == CELL_SAVEDATA_CBRESULT_OK_LAST) || (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST_NOCONFIRM))
{
return CELL_OK;
}
}

if (selected >= 0)
Expand Down Expand Up @@ -519,6 +527,11 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
}
}

if ((result->result == CELL_SAVEDATA_CBRESULT_OK_LAST) || (result->result == CELL_SAVEDATA_CBRESULT_OK_LAST_NOCONFIRM))
{
return CELL_OK;
}

// Create save directory if necessary
if (psf.size() && save_entry.isNew && !fs::create_dir(dir_path))
{
Expand Down
6 changes: 6 additions & 0 deletions rpcs3/Emu/Cell/Modules/sys_net.cpp
Expand Up @@ -723,6 +723,12 @@ namespace sys_net
libnet.warning("socketclose(s=%d)", s);
std::shared_ptr<sys_net_socket> sock = idm::get<sys_net_socket>(s);

if (!sock)
{
libnet.error("socketclose(): socket does not exist, or was already closed");
return -1;
}

#ifdef _WIN32
s32 ret = ::closesocket(sock->s);
#else
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Memory/vm.cpp
Expand Up @@ -621,7 +621,7 @@ namespace vm
size = ::align(size, 4096);

// return if addr or size is invalid
if (!size || size > this->size || addr < this->addr || addr + size - 1 >= this->addr + this->size - 1)
if (!size || size > this->size || addr < this->addr || addr + size - 1 > this->addr + this->size -1)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last this->size -1 should be this->size - 1.

{
return 0;
}
Expand Down