aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-08-29 15:43:11 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-08-29 15:43:11 -0300
commit78dab31a66cbc2a330aa2bb790f1696f24f4326a (patch)
tree69366a0db02a05e463994daf64ef450b99d6e7ee
parent9f07f7e53cff91363dea3884f7ac046c41f65612 (diff)
downloadgame-78dab31a66cbc2a330aa2bb790f1696f24f4326a.tar.gz
game-78dab31a66cbc2a330aa2bb790f1696f24f4326a.zip
fix log date logic
-rw-r--r--README.md2
-rw-r--r--src/writer.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 347d139..3b574a8 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ This is the result of manually decompiling the leaked Tibia 7.7 server binary in
The legal status of decompiled and rewritten code is a gray area. While the project contains no original assets or code, CipSoft may still view this as a violation of their claimed intellectual property rights, due to the original binary not being willfully released. As the author, I release this code into the public domain, relinquishing all rights and claims to it (see `LICENSE.txt`).
## Changes
-- The most important change was fixing thread interations. The original binary relied on some old Linux threading library, most likely LinuxThreads, which assigned different process ids to different threads, among other quirks. The fix is small and contained in commit `d359c0a`.
+- The most important change was fixing thread interations. The original binary relied on some old Linux threading library, most likely LinuxThreads, which assigned different process ids to different threads, among other quirks. The fix is small and contained in commit d359c0a.
- Custom RSA routines were replaced with OpenSSL's libcrypto. I didn't bother to translate the decompiled routines because it would be annoying to get write and could end up with security issues. This introduces the **ONLY** dependency required to compile but is fairly simple to get it installed on most Linux distros. For example, on Debian you can use `apt install libssl-dev`.
diff --git a/src/writer.cc b/src/writer.cc
index 093711e..ee712ba 100644
--- a/src/writer.cc
+++ b/src/writer.cc
@@ -123,9 +123,9 @@ void Log(const char *ProtocolName, const char *Text, ...){
return;
}
- bool WriteDate = (strcmp(ProtocolName, "bugreport") == 0)
- || (strcmp(ProtocolName, "client-error") == 0)
- || (strcmp(ProtocolName, "load") == 0);
+ bool WriteDate = (strcmp(ProtocolName, "bugreport") != 0)
+ && (strcmp(ProtocolName, "client-error") != 0)
+ && (strcmp(ProtocolName, "load") != 0);
char Output[256];
va_list ap;