Fix signs loading in wrong position in PSv saves
This commit is contained in:
parent
99566c8003
commit
1dc641d13f
@ -1853,26 +1853,26 @@ void GameSave::readPSv(const std::vector<char> &dataVec)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
auto signCount = data[p++];
|
auto signCount = data[p++];
|
||||||
for (auto i=0; i<signCount; i++)
|
for (auto i = 0; i < signCount; i++)
|
||||||
{
|
{
|
||||||
if (p+6 > dataLength)
|
if (p+6 > dataLength)
|
||||||
throw ParseException(ParseException::Corrupt, "Not enough data at line " MTOS(__LINE__) " in " MTOS(__FILE__));
|
throw ParseException(ParseException::Corrupt, "Not enough data at line " MTOS(__LINE__) " in " MTOS(__FILE__));
|
||||||
{
|
{
|
||||||
auto x = data[p++];
|
int x = data[p++];
|
||||||
x |= ((unsigned)data[p++])<<8;
|
x |= ((unsigned)data[p++])<<8;
|
||||||
tempSign.x = x+partP.X;
|
tempSign.x = x+partP.X;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto y = data[p++];
|
int y = data[p++];
|
||||||
y |= ((unsigned)data[p++])<<8;
|
y |= ((unsigned)data[p++])<<8;
|
||||||
tempSign.y = y+partP.Y;
|
tempSign.y = y+partP.Y;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto ju = data[p++];
|
int ju = data[p++];
|
||||||
tempSign.ju = (sign::Justification)ju;
|
tempSign.ju = (sign::Justification)ju;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
auto l = data[p++];
|
int l = data[p++];
|
||||||
if (p+l > dataLength)
|
if (p+l > dataLength)
|
||||||
throw ParseException(ParseException::Corrupt, "Not enough data at line " MTOS(__LINE__) " in " MTOS(__FILE__));
|
throw ParseException(ParseException::Corrupt, "Not enough data at line " MTOS(__LINE__) " in " MTOS(__FILE__));
|
||||||
if(l>254)
|
if(l>254)
|
||||||
|
Reference in New Issue
Block a user