mirror of
https://github.com/gwdevhub/gMod.git
synced 2026-07-15 15:09:30 +00:00
fix edge case in tpf unscrambling logic
This commit is contained in:
@@ -46,7 +46,7 @@ private:
|
|||||||
|
|
||||||
[[nodiscard]] char XOR(const char b, const long position) const
|
[[nodiscard]] char XOR(const char b, const long position) const
|
||||||
{
|
{
|
||||||
if (position > line_length - 4) {
|
if (position >= (line_length / 4) * 4) {
|
||||||
return b ^ TPF_XOREven;
|
return b ^ TPF_XOREven;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ private:
|
|||||||
|
|
||||||
[[nodiscard]] char XOR(const char b, const long position) const
|
[[nodiscard]] char XOR(const char b, const long position) const
|
||||||
{
|
{
|
||||||
if (position > line_length - 4) {
|
if (position >= (line_length / 4) * 4) {
|
||||||
return b ^ TPF_XOREven;
|
return b ^ TPF_XOREven;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user