From c06fd795744b834f885a5860d5895f9464dd82ea Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 21 Oct 2014 11:53:22 +0200 Subject: [PATCH] Chart: fix endianness swap. * This is most likely dead code currently (it is used only when the framebuffer is big endian, and the the cpu is little endian) * Fixes a warning. * Can't confirm if B_SWAP_INT32 is really supposed to swap the value in-place, or if this is a bug in Chart. Probably the latter. --- src/tests/kits/game/chart/ChartWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/kits/game/chart/ChartWindow.cpp b/src/tests/kits/game/chart/ChartWindow.cpp index bd08da2cf0..7e00e10db4 100644 --- a/src/tests/kits/game/chart/ChartWindow.cpp +++ b/src/tests/kits/game/chart/ChartWindow.cpp @@ -2106,9 +2106,9 @@ ChartWindow::SetColorSpace(buffer *buf, color_space depth) if (swap_needed) { col = buf->colors[0]; for (i = 0; i < 7*8; i++) { - B_SWAP_INT32(col[i]); + col[i] = B_SWAP_INT32(col[i]); } - B_SWAP_INT32(buf->back_color); + buf->back_color = B_SWAP_INT32(buf->back_color); } }