Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Feb 21, 2003
1 parent 91a9d70 commit 5c38289
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions IMG_xcf.c
Expand Up @@ -678,15 +678,15 @@ SDL_Surface *IMG_LoadXCF_RW(SDL_RWops *src) {

unsigned char * (* load_tile) (SDL_RWops *, Uint32, int, int, int);

/* Initialize the data we will clean up when we're done */
surface = NULL;
read_error = 0;

/* Check to make sure we have something to do */
if ( ! src ) {
goto done;
return NULL;
}

/* Initialize the data we will clean up when we're done */
surface = NULL;
read_error = 0;

head = read_xcf_header (src);

switch (head->compr) {
Expand Down Expand Up @@ -714,7 +714,7 @@ SDL_Surface *IMG_LoadXCF_RW(SDL_RWops *src) {
head->layer_file_offsets = NULL;
offsets = 0;

while (offset = SDL_ReadBE32 (src)) {
while ((offset = SDL_ReadBE32 (src))) {
head->layer_file_offsets = (Uint32 *) realloc (head->layer_file_offsets, sizeof (Uint32) * (offsets+1));
head->layer_file_offsets [offsets] = offset;
offsets++;
Expand Down Expand Up @@ -757,7 +757,7 @@ SDL_Surface *IMG_LoadXCF_RW(SDL_RWops *src) {
// read channels
channel = NULL;
chnls = 0;
while (offset = SDL_ReadBE32 (src)) {
while ((offset = SDL_ReadBE32 (src))) {
channel = (xcf_channel **) realloc (channel, sizeof (xcf_channel *) * (chnls+1));
fp = SDL_RWtell (src);
SDL_RWseek (src, offset, SEEK_SET);
Expand Down

0 comments on commit 5c38289

Please sign in to comment.