Replay Fix for 1.16.1
RepFix is a BWL plugin that prevents a buffer overflow that occurs when watching a replay that contains multiple chat messages while the game was paused. When reading recorded game actions in replays, StarCraft stores game actions that occur on the next tick in a statically allocated buffer. Game chat that occurred while a game is paused are recorded (since patch 1.16) on the same tick. A buffer overflow occurs when the size of all the actions on a tick is greater than the size of the statically allocated buffer, which can only occur when there are game chat while a game is paused. If all the game chat during a paused game adds up to over 130 bytes of text, a buffer overflow occurs.
Implementation[edit]
RepFix dynamically allocates a buffer for StarCraft to store actions in rather than allowing it to use its original static buffer. RepFix redirects StarCraft to its dynamically allocated buffer when it attempts to 1) copy actions to the buffer, 2) overwrite the buffer, 3) append data to the buffer, and 4) read from the buffer.
Changelog[edit]
- 0.0.0.2 - Updated to work online
- 0.0.0.3 - Fixed action loss in Battle.net mode
- 0.0.0.4 - Fixed activation behavior