Skip to content

Commit

Permalink
Cast unsigned negative to signed type
Browse files Browse the repository at this point in the history
  • Loading branch information
narknon committed Oct 31, 2023
1 parent fb7d343 commit 15952e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions UE4SS/src/USMapGenerator/Generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ namespace RC::OutTheShade
std::streampos extEndPos = Buffer.GetBuffer().tellp();

Buffer.GetBuffer().seekp(extStartPos);
Buffer.GetBuffer().seekp(-sizeof(uint32_t), std::ios_base::cur);
Buffer.GetBuffer().seekp(-(int32)sizeof(uint32), std::ios_base::cur);
Buffer.Write<uint32_t>(extEndPos - extStartPos);
Buffer.GetBuffer().seekp(extEndPos);

Expand Down Expand Up @@ -459,7 +459,7 @@ namespace RC::OutTheShade
extEndPos = Buffer.GetBuffer().tellp();

Buffer.GetBuffer().seekp(extStartPos);
Buffer.GetBuffer().seekp(-sizeof(uint32_t), std::ios_base::cur);
Buffer.GetBuffer().seekp(-(int32)sizeof(uint32), std::ios_base::cur);
Buffer.Write<uint32_t>(extEndPos - extStartPos);
Buffer.GetBuffer().seekp(extEndPos);

Expand All @@ -486,7 +486,7 @@ namespace RC::OutTheShade
extEndPos = Buffer.GetBuffer().tellp();

Buffer.GetBuffer().seekp(extStartPos);
Buffer.GetBuffer().seekp(-sizeof(uint32_t), std::ios_base::cur);
Buffer.GetBuffer().seekp(-(int32)sizeof(uint32), std::ios_base::cur);
Buffer.Write<uint32_t>(extEndPos - extStartPos);
Buffer.GetBuffer().seekp(extEndPos);

Expand Down

0 comments on commit 15952e6

Please sign in to comment.