From a36da99798b99ca1d15ccdde00ef86af412d2a16 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 16 Feb 2020 12:44:33 +0300 Subject: review fixes --- src/control/Script.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/control/Script.h') diff --git a/src/control/Script.h b/src/control/Script.h index 426a0f50..a1b35dcc 100644 --- a/src/control/Script.h +++ b/src/control/Script.h @@ -11,6 +11,8 @@ class CPed; class CObject; class CPlayerInfo; +#define KEY_LENGTH_IN_SCRIPT 8 + struct CScriptRectangle { int8 m_bIsUsed; @@ -409,11 +411,11 @@ public: return Read2BytesFromScript(pIp) / 16.0f; } static void ReadTextLabelFromScript(uint32* pIp, char* buf){ - strncpy(buf, (const char*)&ScriptSpace[*pIp], 8); + strncpy(buf, (const char*)&ScriptSpace[*pIp], KEY_LENGTH_IN_SCRIPT); } static wchar* GetTextByKeyFromScript(uint32* pIp) { wchar* text = TheText.Get((const char*)&ScriptSpace[*pIp]); - *pIp += 8; + *pIp += KEY_LENGTH_IN_SCRIPT; return text; } }; -- cgit v1.2.3