mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-24 03:25:40 +00:00
Fixing array sizes in CMessages
This commit is contained in:
parent
17441c972b
commit
ccf9c53049
1 changed files with 17 additions and 17 deletions
|
@ -118,7 +118,7 @@ CMessages::Process()
|
|||
void
|
||||
CMessages::Display()
|
||||
{
|
||||
wchar outstr[260];
|
||||
wchar outstr[256];
|
||||
|
||||
DefinedState();
|
||||
|
||||
|
@ -154,7 +154,7 @@ CMessages::Display()
|
|||
void
|
||||
CMessages::AddMessage(wchar *msg, uint32 time, uint16 flag)
|
||||
{
|
||||
wchar outstr[514]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
WideStringCopy(outstr, msg, 256);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -190,7 +190,7 @@ CMessages::AddMessage(wchar *msg, uint32 time, uint16 flag)
|
|||
void
|
||||
CMessages::AddMessageJumpQ(wchar *msg, uint32 time, uint16 flag)
|
||||
{
|
||||
wchar outstr[514]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
WideStringCopy(outstr, msg, 256);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -212,7 +212,7 @@ CMessages::AddMessageJumpQ(wchar *msg, uint32 time, uint16 flag)
|
|||
void
|
||||
CMessages::AddMessageSoon(wchar *msg, uint32 time, uint16 flag)
|
||||
{
|
||||
wchar outstr[520]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
WideStringCopy(outstr, msg, 256);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -272,7 +272,7 @@ CMessages::ClearSmallMessagesOnly()
|
|||
void
|
||||
CMessages::AddBigMessage(wchar *msg, uint32 time, uint16 style)
|
||||
{
|
||||
wchar outstr[514]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
WideStringCopy(outstr, msg, 256);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -292,7 +292,7 @@ CMessages::AddBigMessage(wchar *msg, uint32 time, uint16 style)
|
|||
void
|
||||
CMessages::AddBigMessageQ(wchar *msg, uint32 time, uint16 style)
|
||||
{
|
||||
wchar outstr[518]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
WideStringCopy(outstr, msg, 256);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -358,8 +358,8 @@ CMessages::AddToPreviousBriefArray(wchar *text, int32 n1, int32 n2, int32 n3, in
|
|||
void
|
||||
CMessages::InsertNumberInString(wchar *str, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6, wchar *outstr)
|
||||
{
|
||||
char numStr[12];
|
||||
wchar wNumStr[18];
|
||||
char numStr[10];
|
||||
wchar wNumStr[10];
|
||||
|
||||
if (str == nil) {
|
||||
*outstr = '\0';
|
||||
|
@ -398,7 +398,7 @@ CMessages::InsertNumberInString(wchar *str, int32 n1, int32 n2, int32 n3, int32
|
|||
void
|
||||
CMessages::InsertStringInString(wchar *str1, wchar *str2)
|
||||
{
|
||||
wchar tempstr[264];
|
||||
wchar tempstr[256];
|
||||
|
||||
if (!str1 || !str2) return;
|
||||
|
||||
|
@ -432,7 +432,7 @@ CMessages::InsertPlayerControlKeysInString(wchar *str)
|
|||
{
|
||||
uint16 i;
|
||||
wchar outstr[256];
|
||||
wchar keybuf[264];
|
||||
wchar keybuf[256];
|
||||
|
||||
if (!str) return;
|
||||
uint16 strSize = GetWideStringLength(str);
|
||||
|
@ -472,7 +472,7 @@ CMessages::InsertPlayerControlKeysInString(wchar *str)
|
|||
void
|
||||
CMessages::AddMessageWithNumber(wchar *str, uint32 time, uint16 flag, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6)
|
||||
{
|
||||
wchar outstr[520]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
InsertNumberInString(str, n1, n2, n3, n4, n5, n6, outstr);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -509,7 +509,7 @@ CMessages::AddMessageWithNumber(wchar *str, uint32 time, uint16 flag, int32 n1,
|
|||
void
|
||||
CMessages::AddMessageJumpQWithNumber(wchar *str, uint32 time, uint16 flag, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6)
|
||||
{
|
||||
wchar outstr[520]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
InsertNumberInString(str, n1, n2, n3, n4, n5, n6, outstr);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -531,7 +531,7 @@ CMessages::AddMessageJumpQWithNumber(wchar *str, uint32 time, uint16 flag, int32
|
|||
void
|
||||
CMessages::AddMessageSoonWithNumber(wchar *str, uint32 time, uint16 flag, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6)
|
||||
{
|
||||
wchar outstr[520]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
InsertNumberInString(str, n1, n2, n3, n4, n5, n6, outstr);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -570,7 +570,7 @@ CMessages::AddMessageSoonWithNumber(wchar *str, uint32 time, uint16 flag, int32
|
|||
void
|
||||
CMessages::AddBigMessageWithNumber(wchar *str, uint32 time, uint16 style, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6)
|
||||
{
|
||||
wchar outstr[520]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
InsertNumberInString(str, n1, n2, n3, n4, n5, n6, outstr);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -591,7 +591,7 @@ CMessages::AddBigMessageWithNumber(wchar *str, uint32 time, uint16 style, int32
|
|||
void
|
||||
CMessages::AddBigMessageWithNumberQ(wchar *str, uint32 time, uint16 style, int32 n1, int32 n2, int32 n3, int32 n4, int32 n5, int32 n6)
|
||||
{
|
||||
wchar outstr[520]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
InsertNumberInString(str, n1, n2, n3, n4, n5, n6, outstr);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
GetWideStringLength(outstr);
|
||||
|
@ -619,7 +619,7 @@ CMessages::AddBigMessageWithNumberQ(wchar *str, uint32 time, uint16 style, int32
|
|||
void
|
||||
CMessages::AddMessageWithString(wchar *text, uint32 time, uint16 flag, wchar *str)
|
||||
{
|
||||
wchar outstr[516]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
WideStringCopy(outstr, text, 256);
|
||||
InsertStringInString(outstr, str);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
|
@ -657,7 +657,7 @@ CMessages::AddMessageWithString(wchar *text, uint32 time, uint16 flag, wchar *st
|
|||
void
|
||||
CMessages::AddMessageJumpQWithString(wchar *text, uint32 time, uint16 flag, wchar *str)
|
||||
{
|
||||
wchar outstr[516]; // unused
|
||||
wchar outstr[512]; // unused
|
||||
WideStringCopy(outstr, text, 256);
|
||||
InsertStringInString(outstr, str);
|
||||
InsertPlayerControlKeysInString(outstr);
|
||||
|
|
Loading…
Reference in a new issue