The trial court sentenced the defendant to the upper term, but suspended execution of the term and granted him probation in a residential treatment program. The trial court required the defendant to waive all the presentence credit he would accrue while he awaited placement in the program and credits he might otherwise be entitled to for participation in the program itself. The Court of Appeal upheld the waiver over the argument that the sentence was unauthorized because the waiver increased his potential custody time to greater than the longest sentence allowed by law. The court disagreed with the rationale and much of the reasoning of People v.Tran (2000) 78 Cal.App.4th 383, and distinguished it factually because it did not involve a treatment program. The Court of Appeal first concluded that the issue was not preserved for appeal due to counsel’s vague and ambiguous objection. To forestall an ineffective assistance claim, it also rejected the argument on its merits. Defendant received the benefit of a chance at probation in return for the credit waiver and he may not trifle with the courts by accepting the offer of leniency and then trying to better the bargain through the appellate process.