[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegraphics/kfile-plugins/jpeg
From:       Pascal Létourneau <pascal.letourneau () kdemail ! net>
Date:       2006-07-30 2:49:23
Message-ID: 1154227763.226691.30974.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 567769 by pletourn:

Unbreak porting


 M  +6 -6      exif.cpp  


--- trunk/KDE/kdegraphics/kfile-plugins/jpeg/exif.cpp #567768:567769
@@ -222,9 +222,9 @@
         return false;
 
     char dummy = 0;
-    if ( a == 0xff )
+    if ( uchar(a) == 0xff )
         infile.getChar( &dummy );
-    if (a != 0xff || dummy != M_SOI) {
+    if (uchar(a) != 0xff || uchar(dummy) != M_SOI) {
         SectionsRead = 0;
         return false;
     }
@@ -237,7 +237,7 @@
 
         for (a=0;a<7;a++){
             infile.getChar(&marker);
-            if (marker != 0xff) break;
+            if (uchar(marker) != 0xff) break;
 
             if (a >= 6){
 
@@ -247,7 +247,7 @@
             }
         }
 
-        if (marker == 0xff){
+        if (uchar(marker) == 0xff){
             // 0xff is legal padding, but if we get that many, something's wrong.
             throw FatalError("too many padding bytes!");
         }
@@ -255,10 +255,10 @@
         Sections[SectionsRead].Type = marker;
 
         // Read the length of the section.
+        infile.getChar(&lh);
         infile.getChar(&ll);
-        infile.getChar(&lh);
 
-        itemlen = (lh << 8) | ll;
+        itemlen = (uchar(lh) << 8) | uchar(ll);
 
         if (itemlen < 2) {
             throw FatalError("invalid marker");
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic