[Commits] SDL_image: xcf: fix code formatting.

libsdl.org revision control commits-owner at libsdl.org
Sat Jan 27 14:31:27 PST 2018


details:   https://hg.libsdl.org/SDL_image/rev/607436eb1473
changeset: 561:607436eb1473
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Sat Jan 27 17:31:24 2018 -0500
description:
xcf: fix code formatting.

diffstat:

 IMG_xcf.c |  49 ++++++++++++++++++++++++-------------------------
 1 files changed, 24 insertions(+), 25 deletions(-)

diffs (76 lines):

diff -r 7df1580f1695 -r 607436eb1473 IMG_xcf.c
--- a/IMG_xcf.c	Sat Jan 27 17:27:55 2018 -0500
+++ b/IMG_xcf.c	Sat Jan 27 17:31:24 2018 -0500
@@ -497,11 +497,11 @@
 
       length = val;
       if (length >= 128) {
-    length = 255 - (length - 1);
-    if (length == 128) {
-      length = (*t << 8) + t[1];
-      t += 2;
-    }
+        length = 255 - (length - 1);
+        if (length == 128) {
+          length = (*t << 8) + t[1];
+          t += 2;
+        }
 
         if (((size_t) (t - load) + length) >= len) {
           break;  /* bogus data */
@@ -509,20 +509,19 @@
           break;  /* bogus data */
         }
 
-    count += length;
-    size -= length;
+        count += length;
+        size -= length;
 
-    while (length-- > 0) {
-      *d = *t++;
-      d += bpp;
-    }
-      }
-      else {
-    length += 1;
-    if (length == 128) {
-      length = (*t << 8) + t[1];
-      t += 2;
-    }
+        while (length-- > 0) {
+          *d = *t++;
+          d += bpp;
+        }
+      } else {
+        length += 1;
+        if (length == 128) {
+          length = (*t << 8) + t[1];
+          t += 2;
+        }
 
         if (((size_t) (t - load)) >= len) {
           break;  /* bogus data */
@@ -530,15 +529,15 @@
           break;  /* bogus data */
         }
 
-    count += length;
-    size -= length;
+        count += length;
+        size -= length;
 
-    val = *t++;
+        val = *t++;
 
-    for (j = 0; j < length; j++) {
-      *d = val;
-      d += bpp;
-    }
+        for (j = 0; j < length; j++) {
+          *d = val;
+          d += bpp;
+        }
       }
     }
 


More information about the commits mailing list