[haiku-commits] haiku: hrev48064 - src/tests/kits/game/chart

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 21 Oct 2014 11:55:39 +0200 (CEST)

hrev48064 adds 1 changeset to branch 'master'
old head: 06f436b3ac2c073913bc7e7afb56365a2ca978eb
new head: c06fd795744b834f885a5860d5895f9464dd82ea
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=c06fd79+%5E06f436b

----------------------------------------------------------------------------

c06fd79: 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.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev48064
Commit:      c06fd795744b834f885a5860d5895f9464dd82ea
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c06fd79
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Tue Oct 21 09:53:22 2014 UTC

----------------------------------------------------------------------------

1 file changed, 2 insertions(+), 2 deletions(-)
src/tests/kits/game/chart/ChartWindow.cpp | 4 ++--

----------------------------------------------------------------------------

diff --git a/src/tests/kits/game/chart/ChartWindow.cpp 
b/src/tests/kits/game/chart/ChartWindow.cpp
index bd08da2..7e00e10 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);
        }
 }
 


Other related posts:

  • » [haiku-commits] haiku: hrev48064 - src/tests/kits/game/chart - pulkomandy