fix edge case in tpf unscrambling logic

This commit is contained in:
DubbleClick
2026-04-15 22:22:32 +07:00
parent 313c7390ca
commit e1900cd342
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
} }
+1 -1
View File
@@ -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;
} }