Fix MCPI Ignoring ♪

This commit is contained in:
TheBrokenRail 2024-01-28 21:48:51 -05:00
parent 7c9d16d662
commit ccc7e5b190
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ static std::string to_utf8(const std::u32string &s) {
// Minecraft-Flavored CP437
#define CP437_CHARACTERS 256
static const std::string cp437_characters_map[CP437_CHARACTERS] = {
"\0", "", "", "", "", "", "", "", "", "", "\n", "", "", "\r", "", "",
"\0", "", "", "", "", "", "", "", "", "", "\n", "", "", "", "", "",
"", "", "", "", "", "§", "", "", "", "", "", "", "", "", "", "",
" ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?",

View File

@ -14,7 +14,7 @@ void sanitize_string(char **str, int max_length, unsigned int allow_newlines) {
// Loop Through Message
if (!allow_newlines) {
for (int i = 0; i < length; i++) {
if ((*str)[i] == '\n' || (*str)[i] == '\r') {
if ((*str)[i] == '\n') {
// Replace Newline
(*str)[i] = ' ';
}