diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCharacter.h b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCharacter.h index c9582d98..b880941a 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCharacter.h +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCharacter.h @@ -18,9 +18,12 @@ class CTServiceCharacter target[0] = 0; return; } + int offset = 0; - while (offset < length && (target[offset++] = source[offset])); - target[length-1] = 0; + while (offset < length && (target[(offset+1)] = source[offset])) { + target[length-1] = 0; + offset++; + } } public: enum { CHARACTER_SIZE=64, CHARACTER_BUFFER, REASON_SIZE=4096, REASON_BUFFER }; diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceServer.h b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceServer.h index 7d76ddff..5cef4bde 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceServer.h +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceServer.h @@ -17,9 +17,12 @@ class CTServiceServer target[0] = 0; return; } + int offset = 0; - while (offset < length && (target[offset++] = source[offset])); - target[length-1] = 0; + while (offset < length && (target[(offset+1)] = source[offset])) { + target[length-1] = 0; + offset++; + } } public: enum { SERVER_SIZE=64, SERVER_BUFFER, REASON_SIZE=4096, REASON_BUFFER };