Browse Source

Fixed issue where player names that begin with x are not displayed.

master
5 years ago
parent
commit
09a972b4d3
  1. 15
      includes/colors.c

15
includes/colors.c

@ -143,14 +143,15 @@ static void b(char * const str) { @@ -143,14 +143,15 @@ static void b(char * const str) {
if (strlen(token) > 1) {
printf("%s", token + 1);
}
} else if (c == 'x' && strlen(token) > 3) {
if (isxdigit(token[1]) && isxdigit(token[2]) && isxdigit(token[3])) {
hexspan(token + 1); //exclude x
if (strlen(token) > 4){
printf("%s", token + 4);
}
printf("</span>");
} else if ((c == 'x' && strlen(token) > 3) &&
(isxdigit(token[1]) &&
isxdigit(token[2]) &&
isxdigit(token[3]))) {
hexspan(token + 1); //exclude x
if (strlen(token) > 4){
printf("%s", token + 4);
}
printf("</span>");
} else {
printf("%s", token);
}

Loading…
Cancel
Save