[haiku-commits] haiku: hrev43350 - src/add-ons/translators/tga

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 28 Nov 2011 00:45:13 +0100 (CET)

hrev43350 adds 1 changeset to branch 'master'
old head: 4d5d809045a34976acd52243ac4d475300f804f2
new head: 9f66f05b58e3a033984f1271ac986a2c99226103

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

1 files changed, 1 insertions(+), 1 deletions(-)
src/add-ons/translators/tga/TGATranslator.cpp |    2 +-

############################################################################

Revision:    hrev43350
Commit:      9f66f05b58e3a033984f1271ac986a2c99226103
URL:         http://cgit.haiku-os.org/haiku/commit/?id=9f66f05
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Sun Nov 27 23:42:17 2011 UTC

Fix never met condition

(descriptor & 0x10)==1 could never be met, it would return 0x10 or 0x00

CID 2567

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

diff --git a/src/add-ons/translators/tga/TGATranslator.cpp 
b/src/add-ons/translators/tga/TGATranslator.cpp
index 31ebe87..96f9075 100644
--- a/src/add-ons/translators/tga/TGATranslator.cpp
+++ b/src/add-ons/translators/tga/TGATranslator.cpp
@@ -340,7 +340,7 @@ identify_tga_header(BPositionIO *inSource, translator_info 
*outInfo,
        imagespec.descriptor = buf[17];
        // images ordered from Right to Left (rather than Left to Right)
        // are not supported
-       if ((imagespec.descriptor & TGA_ORIGIN_HORZ_BIT) == TGA_ORIGIN_RIGHT)
+       if ((imagespec.descriptor & TGA_ORIGIN_HORZ_BIT) != TGA_ORIGIN_LEFT)
                return B_NO_TRANSLATOR;
        // unused descriptor bits, these bits must be zero
        if (imagespec.descriptor & TGA_DESC_BITS76)


Other related posts:

  • » [haiku-commits] haiku: hrev43350 - src/add-ons/translators/tga - stpere