mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 23:21:20 -04:00
[Server] Fix problem with fetching interior cell descriptions
This commit is contained in:
parent
db7709ee18
commit
51b95f35cd
@ -46,7 +46,13 @@ const char *CellFunctions::GetCell(unsigned short pid) noexcept
|
|||||||
Player *player;
|
Player *player;
|
||||||
GET_PLAYER(pid, player, 0);
|
GET_PLAYER(pid, player, 0);
|
||||||
|
|
||||||
return player->cell.getDescription().c_str();
|
string cellDescription = player->cell.getDescription().c_str();
|
||||||
|
|
||||||
|
static vector<char> cstrDescription;
|
||||||
|
cstrDescription.reserve(cellDescription.size() + 1);
|
||||||
|
strncpy(&cstrDescription[0], cellDescription.c_str(), cstrDescription.capacity());
|
||||||
|
|
||||||
|
return &cstrDescription[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
void CellFunctions::SetCell(unsigned short pid, const char *cellDescription) noexcept
|
void CellFunctions::SetCell(unsigned short pid, const char *cellDescription) noexcept
|
||||||
|
Loading…
x
Reference in New Issue
Block a user