Probable fix for 'Debug Assertion Failure' in Client::GarbleMessage()

This commit is contained in:
Uleat 2015-04-22 12:29:35 -04:00
parent 23dd560a72
commit c974b30192
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) EQEMu Changelog (Started on Sept 24, 2003 15:50)
------------------------------------------------------- -------------------------------------------------------
== 04/22/2015 ==
Uleat: Probable fix for 'Debug Assertion Failure' in Client::GarbleMessage() when calling the 'isalpha' macro.
ref: https://connect.microsoft.com/VisualStudio/feedback/details/932876/calling-isdigit-with-a-signed-char-1-results-in-a-assert-failure-in-debug-compiles
== 03/29/2015 == == 03/29/2015 ==
Secrets: Identified the Target Ring fields for RoF/RoF2. Secrets: Identified the Target Ring fields for RoF/RoF2.
Secrets: Added a perl accessor for the last target ring position received from the client. Usage: $client->GetTargetRingX(), $client->GetTargetRingY(), $client->GetTargetRingZ() Secrets: Added a perl accessor for the last target ring position received from the client. Usage: $client->GetTargetRingX(), $client->GetTargetRingY(), $client->GetTargetRingZ()

View File

@ -7500,7 +7500,7 @@ void Client::GarbleMessage(char *message, uint8 variance)
} }
uint8 chance = (uint8)zone->random.Int(0, 115); // variation just over worst possible scrambling uint8 chance = (uint8)zone->random.Int(0, 115); // variation just over worst possible scrambling
if (isalpha(message[i]) && (chance <= variance)) { if (isalpha((unsigned char)message[i]) && (chance <= variance)) {
uint8 rand_char = (uint8)zone->random.Int(0,51); // choose a random character from the alpha list uint8 rand_char = (uint8)zone->random.Int(0,51); // choose a random character from the alpha list
message[i] = alpha_list[rand_char]; message[i] = alpha_list[rand_char];
} }