Skip to content

Commit

Permalink
Merge pull request H-uru#1415 from dgelessus/remove_old_safestring_fo…
Browse files Browse the repository at this point in the history
…rmat

Drop SafeString "backward compat hack" from 20 years ago
  • Loading branch information
zrax authored Jun 30, 2023
2 parents 814a6ac + a599242 commit 6d2eb8d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Sources/Plasma/CoreLib/hsStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,7 @@ ST::string hsStream::ReadSafeString()
ST::char_buffer name;
uint16_t numChars = ReadLE16();

#ifndef REMOVE_ME_SOON
// Backward compat hack - remove in a week or so (from 6/30/03)
bool oldFormat = !(numChars & 0xf000);
if (oldFormat)
(void)ReadLE16();
#endif
hsAssert(numChars & 0xf000, "SafeString in old (pre-2003) format");

numChars &= ~0xf000;
hsAssert(numChars <= GetSizeLeft(), "Bad string");
Expand Down

0 comments on commit 6d2eb8d

Please sign in to comment.