Skip to content

Commit 05e6f89

Browse files
committed
Merge branch 'commandhandler-controlling' of https://github.com/MohabCodeX/mtasa-blue into commandhandler-controlling
1 parent 120bb04 commit 05e6f89

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

vendor/cegui-0.4.0-custom/src/tinyxml/tinystr.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,13 @@ void TiXmlString::append( const char* str, int len )
178178
{
179179
// we know we can safely append the new string
180180
// strncat (cstring, str, len);
181-
memcpy (cstring + length (),
181+
unsigned old_length = current_length;
182+
current_length = new_size - 1;
183+
memcpy (cstring + old_length,
182184
str,
183185
size_suffix);
186+
cstring [current_length] = 0;
184187
}
185-
current_length = new_size - 1;
186-
cstring [current_length] = 0;
187188
}
188189

189190

0 commit comments

Comments
 (0)