From c949dbb9d95f4671920ceed7d376d116c15c1776 Mon Sep 17 00:00:00 2001 From: Shylie Date: Wed, 28 Feb 2024 12:38:48 -0500 Subject: [PATCH] Fix bg color get --- source/terml.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/terml.cpp b/source/terml.cpp index 1ab1f34..38764bc 100644 --- a/source/terml.cpp +++ b/source/terml.cpp @@ -57,19 +57,19 @@ char terml::get(unsigned int x, unsigned int y, int* fg, int* bg) const if (bg) { const unsigned char r = - (buffer[offset * CELL_SIZE + 26] - '0') + + (buffer[offset * CELL_SIZE + 28] - '0') + (buffer[offset * CELL_SIZE + 27] - '0') * 10 + - (buffer[offset * CELL_SIZE + 28] - '0') * 100; + (buffer[offset * CELL_SIZE + 26] - '0') * 100; const unsigned char g = - (buffer[offset * CELL_SIZE + 30] - '0') + + (buffer[offset * CELL_SIZE + 32] - '0') + (buffer[offset * CELL_SIZE + 31] - '0') * 10 + - (buffer[offset * CELL_SIZE + 32] - '0') * 100; + (buffer[offset * CELL_SIZE + 30] - '0') * 100; const unsigned char b = - (buffer[offset * CELL_SIZE + 34] - '0') + + (buffer[offset * CELL_SIZE + 36] - '0') + (buffer[offset * CELL_SIZE + 35] - '0') * 10 + - (buffer[offset * CELL_SIZE + 36] - '0') * 100; + (buffer[offset * CELL_SIZE + 34] - '0') * 100; *bg = (r << 16) | (g << 8) | b; }