Do not memcpy the destination itself

This commit is contained in:
gocha 2010-04-04 09:12:55 +00:00
parent 99ccf835b8
commit 8db331c5ff
1 changed files with 3 additions and 1 deletions

View File

@ -823,7 +823,9 @@ int NDS_CreateDummyFirmware( struct NDS_fw_config_data *user_settings)
//Wifi settings CRC16
(*(u16*)(MMU.fw.data + 0x2A)) = calc_CRC16(0, (MMU.fw.data + 0x2C), 0x138);
memcpy(&CommonSettings.InternalFirmConf, user_settings, sizeof(struct NDS_fw_config_data));
if (&CommonSettings.InternalFirmConf != user_settings)
memcpy(&CommonSettings.InternalFirmConf, user_settings, sizeof(struct NDS_fw_config_data));
return TRUE ;
}