xcf: fix code formatting.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 27 Jan 2018 17:31:24 -0500
changeset 561607436eb1473
parent 560 7df1580f1695
child 562 d0142861559c
xcf: fix code formatting.
IMG_xcf.c
     1.1 --- a/IMG_xcf.c	Sat Jan 27 17:27:55 2018 -0500
     1.2 +++ b/IMG_xcf.c	Sat Jan 27 17:31:24 2018 -0500
     1.3 @@ -497,11 +497,11 @@
     1.4  
     1.5        length = val;
     1.6        if (length >= 128) {
     1.7 -    length = 255 - (length - 1);
     1.8 -    if (length == 128) {
     1.9 -      length = (*t << 8) + t[1];
    1.10 -      t += 2;
    1.11 -    }
    1.12 +        length = 255 - (length - 1);
    1.13 +        if (length == 128) {
    1.14 +          length = (*t << 8) + t[1];
    1.15 +          t += 2;
    1.16 +        }
    1.17  
    1.18          if (((size_t) (t - load) + length) >= len) {
    1.19            break;  /* bogus data */
    1.20 @@ -509,20 +509,19 @@
    1.21            break;  /* bogus data */
    1.22          }
    1.23  
    1.24 -    count += length;
    1.25 -    size -= length;
    1.26 +        count += length;
    1.27 +        size -= length;
    1.28  
    1.29 -    while (length-- > 0) {
    1.30 -      *d = *t++;
    1.31 -      d += bpp;
    1.32 -    }
    1.33 -      }
    1.34 -      else {
    1.35 -    length += 1;
    1.36 -    if (length == 128) {
    1.37 -      length = (*t << 8) + t[1];
    1.38 -      t += 2;
    1.39 -    }
    1.40 +        while (length-- > 0) {
    1.41 +          *d = *t++;
    1.42 +          d += bpp;
    1.43 +        }
    1.44 +      } else {
    1.45 +        length += 1;
    1.46 +        if (length == 128) {
    1.47 +          length = (*t << 8) + t[1];
    1.48 +          t += 2;
    1.49 +        }
    1.50  
    1.51          if (((size_t) (t - load)) >= len) {
    1.52            break;  /* bogus data */
    1.53 @@ -530,15 +529,15 @@
    1.54            break;  /* bogus data */
    1.55          }
    1.56  
    1.57 -    count += length;
    1.58 -    size -= length;
    1.59 +        count += length;
    1.60 +        size -= length;
    1.61  
    1.62 -    val = *t++;
    1.63 +        val = *t++;
    1.64  
    1.65 -    for (j = 0; j < length; j++) {
    1.66 -      *d = val;
    1.67 -      d += bpp;
    1.68 -    }
    1.69 +        for (j = 0; j < length; j++) {
    1.70 +          *d = val;
    1.71 +          d += bpp;
    1.72 +        }
    1.73        }
    1.74      }
    1.75