Correctness of ideal protocol of MPC in presence of malicious adversary In presence of malicious adversaries in ideal protocol of Multi Party Computation, how can honest parties get the correct output? 
i.e., corrupted parties modify their inputs and give to the trusted party. Trusted Party computes the function by taking honest party inputs and modified inputs of corrupted parties which results in a wrong output.
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.