mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 12:44:56 +00:00 
			
		
		
		
	Do not pass NULL to memcpy
ReadJoyConControllerType calls WriteSubcommandSync with pbuf=NULL
This commit is contained in:
		
							parent
							
								
									42b2320756
								
							
						
					
					
						commit
						59a104b803
					
				| 
						 | 
				
			
			@ -493,7 +493,9 @@ static void ConstructSubcommand(SDL_DriverSwitch_Context *ctx, ESwitchSubcommand
 | 
			
		|||
    SDL_memcpy(outPacket->commonData.rumbleData, ctx->m_RumblePacket.rumbleData, sizeof(ctx->m_RumblePacket.rumbleData));
 | 
			
		||||
 | 
			
		||||
    outPacket->ucSubcommandID = ucCommandID;
 | 
			
		||||
    SDL_memcpy(outPacket->rgucSubcommandData, pBuf, ucLen);
 | 
			
		||||
    if (pBuf) {
 | 
			
		||||
        SDL_memcpy(outPacket->rgucSubcommandData, pBuf, ucLen);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ctx->m_nCommandNumber = (ctx->m_nCommandNumber + 1) & 0xF;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue