From 22507f6b8a4622e0d9371a345f592d61e74208a2 Mon Sep 17 00:00:00 2001 From: WPMGPRoSToTeMa Date: Tue, 2 Feb 2016 05:44:43 +0300 Subject: [PATCH] Fixed MSG_WriteBitString (bug with non-ASCII chars) (#150) --- rehlds/engine/common.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rehlds/engine/common.cpp b/rehlds/engine/common.cpp index b9772eb..ce8ccc2 100644 --- a/rehlds/engine/common.cpp +++ b/rehlds/engine/common.cpp @@ -674,7 +674,11 @@ void MSG_WriteSBits(int data, int numbits) void MSG_WriteBitString(const char *p) { +#ifdef REHLDS_FIXES + const uint8_t *pch = (uint8_t *)p; +#else // REHLDS_FIXES char *pch = (char *)p; +#endif // REHLDS_FIXES while (*pch) {