diff options
author | elfmz <fenix1905@tut.by> | 2022-11-07 19:26:09 +0300 |
---|---|---|
committer | elfmz <fenix1905@tut.by> | 2022-11-07 19:26:09 +0300 |
commit | 153a85a0b3386a43b1d1afdc46100f062b83f473 (patch) | |
tree | d83bb20108d782ae1e314a053ac7dceed1117975 | |
parent | d0cdc788ea65410976e8d5c1948d7c94a39b65df (diff) |
TTY/truecolor: fix some colors broken (fix #1391)
-rw-r--r-- | WinPort/src/Backend/TTY/TTYOutput.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/WinPort/src/Backend/TTY/TTYOutput.cpp b/WinPort/src/Backend/TTY/TTYOutput.cpp index 22924574..9c6f79e0 100644 --- a/WinPort/src/Backend/TTY/TTYOutput.cpp +++ b/WinPort/src/Backend/TTY/TTYOutput.cpp @@ -36,7 +36,7 @@ void TTYOutput::TrueColors::AppendSuffix(std::string &out, DWORD rgb) char buf[64]; const auto &it = _colors256_lookup.find(rgb); if (it != _colors256_lookup.end()) { - sprintf(buf, "5;%u;", it->second + 16); + sprintf(buf, "5;%u;", ((unsigned int)it->second) + 16); } else { sprintf(buf, "2;%u;%u;%u;", rgb & 0xff, (rgb >> 8) & 0xff, (rgb >> 16) & 0xff); } |