IMG_pnm.c
changeset 154 201cc5c1b373
parent 121 1bf9c0c87374
child 186 5fbbeabf647f
equal deleted inserted replaced
153:ebab84a66b57 154:201cc5c1b373
    42 {
    42 {
    43 	int start;
    43 	int start;
    44 	int is_PNM;
    44 	int is_PNM;
    45 	char magic[2];
    45 	char magic[2];
    46 
    46 
       
    47 	if ( !src )
       
    48 		return 0;
    47 	start = SDL_RWtell(src);
    49 	start = SDL_RWtell(src);
    48 	is_PNM = 0;
    50 	is_PNM = 0;
    49 	if ( SDL_RWread(src, magic, sizeof(magic), 1) ) {
    51 	if ( SDL_RWread(src, magic, sizeof(magic), 1) ) {
    50 		/*
    52 		/*
    51 		 * PNM magic signatures:
    53 		 * PNM magic signatures: