diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCustomer.h b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCustomer.h index e8a580d0..cf5d2f27 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCustomer.h +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceCustomer.h @@ -19,10 +19,14 @@ class CTServiceCustomer 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 { SHORT_NAME_SIZE=64, SHORT_NAME_BUFFER, PHONE_SIZE=32, PHONE_BUFFER, diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBOrder.h b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBOrder.h index c10f6890..cbd79ad8 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBOrder.h +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBOrder.h @@ -22,9 +22,12 @@ class CTServiceDBOrder 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: diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBTransaction.h b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBTransaction.h index 21dace6c..b96efe7f 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBTransaction.h +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceDBTransaction.h @@ -21,9 +21,12 @@ class CTServiceTransaction 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: diff --git a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceWebAPITransaction.h b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceWebAPITransaction.h index b51fe366..47005521 100644 --- a/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceWebAPITransaction.h +++ b/external/3rd/library/soePlatform/CTServiceGameAPI/CTCommon/CTServiceWebAPITransaction.h @@ -21,9 +21,12 @@ class CTServiceWebAPITransaction 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++; + } } typedef unsigned short uchar_t; diff --git a/external/3rd/library/soePlatform/ChatAPI/utils/UdpLibrary/UdpHashTable.h b/external/3rd/library/soePlatform/ChatAPI/utils/UdpLibrary/UdpHashTable.h index ba9f1748..c10b3533 100644 --- a/external/3rd/library/soePlatform/ChatAPI/utils/UdpLibrary/UdpHashTable.h +++ b/external/3rd/library/soePlatform/ChatAPI/utils/UdpLibrary/UdpHashTable.h @@ -614,7 +614,7 @@ inline int UpperHashString(const char *string) int h = 0; while (*string != 0) { - h = ((31 * h) + (*string >= 'a' && *string <= 'z') ? (*string - 0x20) : *string) ^ (h >> 26); + h = ((31 * h) + ((*string >= 'a' && *string <= 'z') ? (*string - 0x20) : *string)) ^ (h >> 26); string++; } return(h);