Skip to content

Commit

Permalink
allow non-tessfont chars to be copied into console
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Oct 18, 2022
1 parent d0eb7bf commit c4098ff
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/engine/interface/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,12 @@ namespace
return;
}
size_t cblen = std::strlen(cb),
commandlen = std::strlen(commandbuf),
decoded = decodeutf8(reinterpret_cast<uchar *>(&commandbuf[commandlen]), sizeof(commandbuf)-1-commandlen, reinterpret_cast<uchar *>(cb), cblen);
commandbuf[commandlen + decoded] = '\0';
commandlen = std::strlen(commandbuf);
if(strlen(commandbuf) + cblen < 260)
{
std::memcpy(reinterpret_cast<uchar *>(&commandbuf[commandlen]), cb, cblen);
}
commandbuf[commandlen + cblen] = '\0';
SDL_free(cb);
}

Expand Down

0 comments on commit c4098ff

Please sign in to comment.