Correctness of ideal protocol of MPC in presence of malicious adversary
If the honest parties have commitments to the malicious parties' inputs or [encapsulations generated by honest parties] of those inputs, then the function can be modified to check those. ​ Otherwise, the value computed by the trusted party "taking honest party inputs

and modified inputs of corrupted parties" by definition results in a correct output.