mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-11-04 01:34:38 +00:00 
			
		
		
		
	Fixed warning C6385: Reading invalid data from 'one_blitkey'.
This commit is contained in:
		@@ -538,8 +538,14 @@ SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface *surface)
 | 
				
			|||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case SDL_COPY_COLORKEY | SDL_COPY_BLEND:  // this is not super-robust but handles a specific case we found sdl12-compat.
 | 
					    case SDL_COPY_COLORKEY | SDL_COPY_BLEND:  // this is not super-robust but handles a specific case we found sdl12-compat.
 | 
				
			||||||
        return (surface->internal->map.info.a == 255) ? one_blitkey[which] :
 | 
					        if (surface->internal->map.info.a == 255) {
 | 
				
			||||||
                which >= 2 ? Blit1toNAlphaKey : (SDL_BlitFunc)NULL;
 | 
					            if (which < SDL_arraysize(one_blitkey)) {
 | 
				
			||||||
 | 
					                return one_blitkey[which];
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            return which >= 2 ? Blit1toNAlphaKey : (SDL_BlitFunc)NULL;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case SDL_COPY_BLEND:
 | 
					    case SDL_COPY_BLEND:
 | 
				
			||||||
    case SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
 | 
					    case SDL_COPY_MODULATE_ALPHA | SDL_COPY_BLEND:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user