
204 Cal.App.2d 303 (1962)
DON D. WINEGAR, Plaintiff and Respondent,
v.
WILLIAM GRAY, Defendant and Appellant.
Civ. No. 6727. 
California Court of Appeals. Fourth Dist.  
May 31, 1962.
 Frank C. Owen and James M. Lane for Defendant and Appellant.
 Burch, Gregory & Platt and John B. Gregory for Plaintiff and Respondent.
 COUGHLIN, J.
 In this action both the plaintiff, respondent herein, and the defendant, appellant herein, by appropriate pleadings, asked for a declaration of their rights under three written agreements upon which both of them relied; the trial court found a breach thereof by the defendant; judgment for damages in favor of the plaintiff was entered; and the defendant appeals.
 The three agreements in question concerned the manufacture and sale of an article known as a spray gun air cap, upon which the defendant had a patent; purported to vest in the plaintiff the exclusive license to manufacture and sell the same in the United States; as determined by the court, extended this exclusive license to Great Britain and Canada; and provided for modifications respecting the time and extent of performance originally agreed upon, because of litigation pending between the defendant and a former licensee.
 The defendant attacks the judgment insofar as it declares a breach of these contracts by him, contending that it should be reversed because of errors in the admission of parol evidence to vary the terms of such agreements, and in overruling his objection to the admission of the testimony of his former attorney based on the attorney-client privilege; and also attacks the amount of the award against him, claiming that it is based on an error of law and is not supported by the evidence.
 On April 24, 1958, the parties executed a written agreement which, in substance, granted the plaintiff an exclusive license to manufacture and sell the subject air cap in the United States; recited a cash consideration of $1,000; contained an agreement by the plaintiff to manufacture and sell the air caps; provided for the payment of a royalty; prescribed the time and extent of performance; and set forth various other provisions. Three weeks later, a former licensee of the defendant brought suit against him contending that its license to manufacture and sell the air caps had not been terminated. *307 Because of the pendency of this suit, on August 26, 1958, the plaintiff and defendant executed a supplement to the licensing contract of April 24th which, in substance, acknowledged the payment of $10,351.20 by the plaintiff to or on behalf of the defendant; provided for the payment of additional sums by the former and the method of reimbursement by the latter; modified the time and extent of performance by the plaintiff as prescribed by the first contract; contained provisions respecting the pending litigation; and effected a sale to plaintiff of 553 air caps owned by the defendant, at $4.00 per cap. Thereafter the defendant obtained a judgment in his favor in the suit against him by his former licensee, but the latter took an appeal therefrom. On March 3, 1959, the parties entered into a third agreement, contained in a memorandum admittedly ambiguous in many respects, which was to be effective in the event the appeal from the judgment in favor of the defendant, in the action against him by his former licensee, was dismissed, and pending litigation in another suit by an assignee of said licensee against the plaintiff, and a man named Shepherd, was terminated; as determined by the court, contemplated the payment by the plaintiff of the sum of $7,500 to secure such dismissal; prescribed a different minimum royalty schedule; provided for additional payments to the defendant by way of a share in the profits or the issuance of stock in a prospective corporation; provided that the subject contracts should not be terminated by the defendant prior to February 21, 1960, if the plaintiff made the payments prescribed by the new royalty schedule; and, as contended by the plaintiff and found by the court, granted the plaintiff a license to manufacture and sell the air caps in England and Canada.
 Subsequently the defendant executed a contract with another licensee granting the exclusive right to manufacture and sell his patented air caps anywhere in the world, subject only to the rights granted the plaintiff; assigned to such licensee the defendant's rights under his contract with the plaintiff; and thereafter, i.e., on February 22, 1960, purported to grant to the new licensee such exclusive rights without limitation. By letters dated October 12th and October 28, 1959, the defendant, acting through the new licensee to whom he had given a power of attorney, notified the plaintiff that his contract would terminate on February 21, 1960. This action was taken under the assumption that the memorandum agreement authorized such termination on that date without cause. The plaintiff contended, and the trial court determined, that the *308 memorandum agreement extended the original contract for a period of one year, in accord with the provisions contained in the latter, and that the termination provision in the former precluded termination prior to February 21, 1960, for any reason other than nonpayment of prescribed royalties but did not authorize termination thereafter unless the plaintiff was in default; and that the defendant's notification of termination constituted an anticipatory breach of his contract which excused further performance by the plaintiff. The original agreement provided for an annual renewal thereof, upon notice, during the life of the air cap patent.
 Alleged Errors re Liability Issue
 During the course of the trial the plaintiff, over objection, was permitted to introduce parol testimony establishing that the defendant, as a part of the original agreement, had promised to assist in the manufacture of the air caps by making and approving changes in the design and specifications thereof, for which he was paid an additional $4,000. The court found in accord with this evidence. The defendant contends that its admission was error. The defendant also contends that the court erred in overruling his objection and admitting parol evidence supporting the finding eventually made that the memorandum agreement of March 3d extended the exclusive license to Great Britain and Canada. [1] However, whether or not error occurred in these particulars is of no consequence as the judgment decreeing a breach of contract is sustained by findings independent of those tainted by the alleged objectionable evidence. Under these circumstances, the erroneous admission of evidence in support of the non-essential finding will be disregarded on appeal. (Brewer v. Simpson, 53 Cal.2d 567, 584 [2 Cal.Rptr. 609, 349 P.2d 289].)
 [2a] The defendant repudiated the subject contracts by giving notice to terminate the same on February 1, 1960, when the plaintiff was not in default thereunder, and thereupon vested in others the exclusive right to use the patent which he theretofore had vested in the plaintiff. [3] Every contract contains an implied obligation of good faith and fair dealing upon the part of each of the contracting parties (Nelson v. Abraham, 29 Cal.2d 745, 750 [177 P.2d 931]; Universal Sales Corp. v. California etc. Mfg. Co., 20 Cal.2d 751, 771 [128 P.2d 665]), including the obligation not to hinder performance by the other party. (Flying Tiger Line, Inc. v. United States Aircoach, 51 Cal.2d 199, 203 [331 P.2d 37]; Bewick v. Mecham, 26 Cal.2d 92, 99 [156 P.2d 757, 157 A.L.R. 1277]; *309 Tanner v. Title Ins. & Trust Co., 20 Cal.2d 814, 825 [129 P.2d 383].) [2b] When the defendant purportedly transferred to another the rights he had vested in the plaintiff by the subject contracts, he breached his good faith covenant and this breach, of itself, justifies the conclusion reached by the trial court. Furthermore, the trial court found that the defendant repudiated these contracts by his letters of October 12th and October 28, 1959. This repudiation constituted an anticipatory breach which entitled the plaintiff to rescind, to attempt to keep the contract alive, or to treat it as coming to an end and recover damages. (Guerrieri v. Severini, 51 Cal.2d 12, 19 [330 P.2d 635]; Alder v. Drudis, 30 Cal.2d 372, 381 [182 P.2d 195]; Gold Min. & Water Co. v. Swinerton, 23 Cal.2d 19, 29 [142 P.2d 22].) The plaintiff's action in response to these letters also supports the court's finding that a breach had occurred.
 Some confusion has arisen in this case because each of the parties has asked for a declaration of his rights under the subject contracts, and for alternate relief commensurate with the court's determination in the premises. The pleadings by both parties alleged the existence of controversies between them which, among others, included disputes with respect to the obligation of the defendant to assist the plaintiff; and as to the latter's right to a foreign license. However, a determination of these issues was not essential to the disposition eventually reached by the court. [4a] The plaintiff asked for specific performance or damages. At the trial he waived his request for specific performance; acknowledging the difficulties incident to enforcement of such a decree. This waiver was accepted by the defendant. Both parties agreed that the contracts should be terminated. After commencement of suit the plaintiff continued to manufacture and sell air caps under the subject contracts. The defendant contends that this action constituted a waiver of the breach relied upon as a basis for the judgment rendered. However, at all times the plaintiff treated the defendant's repudiation as a breach; brought his action on this basis; attempted to enforce the contracts; and, at the time of trial, treated the repudiation as putting an end to the contracts for all purposes except the recovery of damages. [5] The repudiation of a contract by one of the parties thereto, if acted upon by the nonrepudiating party before withdrawal, constitutes a breach thereof by the former and excuses performance thereunder by the latter (Guerrieri v. Severini, supra, 51 Cal.2d 12, 19-20; Freedman v. Rector, *310 Wardens & V. of St. Matthias Parish, 37 Cal.2d 16, 19 [230 P.2d 629, 31 A.L.R.2d 1]; Gold Min. & Wat. Co. v. Swinerton, supra, 23 Cal.2d 19, 29), [6] and its effect in the premises is not nullified by the fact that the nonrepudiating party attempts to enforce performance. (Guerrieri v. Severini, supra, 51 Cal.2d 12, 19.) [4b] In the instant case the breach became total when the plaintiff waived his right to specific enforcement; both parties stipulated that the contracts be terminated; it appeared that performance was unlikely; and it became obvious that the plaintiff might be protected "only by recovery of damages for the value of the promise." (Coughlin v. Blair, 41 Cal.2d 587, 599 [262 P.2d 305].) At the time of trial, therefore, the subject contracts were terminated for all purposes except as a basis for recovery of damages by the plaintiff. (Coughlin v. Blair, supra, 41 Cal.2d 587, 598; Alder v. Drudis, supra, 30 Cal.2d 372, 386.)
 [7] The defendant also contends that the court erred in admitting into evidence, over his objection, certain testimony by his former attorney. The objection was based upon the attorney-client privilege. The plaintiff contends, and the court held, that the privilege relied upon had been waived. The attorney was called as a witness by the plaintiff; was questioned about matters without the scope of the privilege; and then was cross-examined by the defendant who interrogated him respecting conversations within the privilege. At this juncture counsel for the defendant was reminded by counsel for the plaintiff that the former's line of questioning was "opening the door to a waiver of the privilege of attorney and client." The court concurred. The plaintiff claims that the defendant thereafter solicited testimony subject to the privilege. The defendant disagrees. We have reviewed the record and, without detailing its substance, find that the claim of the plaintiff is well founded. Applying settled rules, it must be held that the privilege was waived. (Estate of Nelson, 132 Cal. 182 [64 P. 294]; Agnew v. Superior Court, 156 Cal.App.2d 838, 840 [320 P.2d 158]; Wilson v. Superior Court, 148 Cal.App.2d 433, 445 [307 P.2d 37]; Estate of Visaxis, 95 Cal.App. 617, 624-625 [273 P. 165]; People v. Riordan, 79 Cal.App. 488, 489 [250 P. 190].)
 [8] In the course of the witness' examination the attorney for plaintiff asked the court if he "might have the opportunity to inspect the file" to which the witness had referred, and the court directed the latter to permit the requested inspection, which took place; several writings were withdrawn *311 therefrom; and these were introduced into evidence. The defendant objects to these proceedings. The court had no authority to order such an unrestricted inspection. The request therefor was not limited to documents that might be material to the subject matter about which the privilege had been waived. In addition there was no compliance with the requirement that before an inspection is ordered some showing must be made as to its purpose other than merely to have the benefit of all of the information possessed by the defendant's attorney. (People v. Lane, 56 Cal.2d 773, 776 [16 Cal.Rptr. 801, 366 P.2d 57]; People v. Cooper, 53 Cal.2d 755, 770 [3 Cal.Rptr. 148, 349 P.2d 964].) However, both parties stipulated that the writings in question might be introduced into evidence. Under these circumstances the error in ordering an unrestricted inspection of the subject file was not prejudicial. Furthermore, there is no showing in what manner the inspection in question, or the writings introduced in evidence, in any way affected the outcome of the case. Under circumstances such as presented in this case, the appellant has an obligation to show that error is prejudicial, if a reversal is to be predicated thereon. (Vaughn v. Jonas, 31 Cal.2d 586, 601 [191 P.2d 432]; Ravel v. Hubbard, 112 Cal.App.2d 255, 258 [246 P.2d 88].) Our review of the writings in question indicates that they could be of no significant consequence in the determination of any of the issues presented. No prejudicial error is shown.
 Alleged Errors re Damages
 The plaintiff's complaint alleged that he had paid the defendant $15,000 under the subject contracts; had expended the further sum of $40,000 in performance thereof; and had furnished personal services in the value of $15,000 also in performance thereof. No other facts upon which an allowance of damages might be made were alleged. The court found that the plaintiff had incurred the loss of his investment, by reason of the defendant's breach, in the total sum of $48,489.36.
 In a written memorandum opinion, filed preliminary to the preparation of findings, the trial judge itemized the factors which he considered in arriving at the amount in question.
 The defendant contends that the court granted the plaintiff both restitution and damages; that the latter was entitled to either one of these but not both, citing Alder v. Drudis, supra, 30 Cal.2d 372, 383 in support of this position; that the evidence does not support the conclusion reached with respect *312 to many of the items allowed; and for these reasons the judgment is erroneous. The factual basis for this contention rests upon the itemization contained in the aforementioned memorandum opinion wherein the trial judge indicated that he would award damages for moneys paid by the plaintiff to or on behalf of the defendant and for expenses incurred in performing the contracts, in each instance itemizing the factors and the amounts considered, and also for loss of profits in the sum of $12,000.
 The plaintiff contends that the damages awarded conformed to the rule that " 'Where, without fault on his part, one party to a contract who is willing to perform it is prevented from doing so by the other party, the primary measure of damages is the amount of his loss, which may consist of his reasonable outlay or expenditure toward performance, and the anticipated profits which he would have derived from performance' " (Buxbom v. Smith, 23 Cal.2d 535, 541 [145 P.2d 305]); also contends that the finding on the issue of damages is fully supported by the evidence without an inclusion of any item for loss of profits; and, further, that the memorandum opinion in question may not be considered in reviewing the alleged errors claimed by the defendant.
 [9] Although a memorandum opinion of the trial judge may not be used to modify, add to or impeach the findings of fact filed in a case, it may be referred to for the purpose of determining whether or not the process used in reaching a decision on the issue of damages conformed to the measure prescribed by law. (Union Sugar Co. v. Hollister Estate Co., 3 Cal.2d 740, 751 [47 P.2d 273]; Swall v. Anderson, 60 Cal.App.2d 825, 831 [141 P.2d 912]; Inskeep v. Bear Creek Co., 54 Cal.App.2d 723, 729 [129 P.2d 401].)
 The defendant contends that the following items of damage are not supported by the evidence:
 1. A $5,000 payment listed as an expenditure for a license to manufacture;
 2. A $3,674.92 payment for attorney's fees;
 3. A $4,286.20 payment listed as general expenses incurred in performance prior to August 1958;
 4. A payment of $1,200 on account of salesman's commissions; and
 5. An award of $12,000 for loss of profits.
 [10] Defendant claims that the $5,000 payment listed as an expenditure for a license to manufacture is not allowable because the evidence shows it to be part of a $7,500 payment *313 made in settlement of the case brought against the plaintiff by the assignee of the prior licensee; was made to effect the memorandum agreement, which was conditioned upon the disposition of that case and a dismissal of the appeal from the judgment in the defendant's favor; and was not made to obtain a license to manufacture.
 The evidence sufficiently supports a finding that the $7,500 was paid to obtain a dismissal of the appeal and that other considerations effected a disposition of the suit against the plaintiff. Under these circumstances, the payment in question was made for defendant's benefit; was a part of the transaction between plaintiff and defendant; and is a proper subject for consideration in determining the loss to plaintiff proximately caused by the defendant's breach of the subject contracts. The defendant's argument to the contrary is without merit.
 The expenditure for attorney's fees was allowed as an expense incurred in performance of the contracts. The defendant's objection to this item goes to the weight of the evidence rather than to its insufficiency as a matter of law and is without merit.
 The general expense item of $4,286.20 is referred to and its propriety acknowledged by the defendant in the supplemental agreement of August 26, 1958. The evidence sufficiently supports the inclusion of this item as an element of damage.
 [11] The $1,200 salesman's commission item is not supported by any evidence. The plaintiff relies upon the August 26th supplemental agreement as evidence in support of this expenditure; however, in this respect, the agreement relied upon merely provides that in the event the plaintiff thereafter should incur "salesman expenses" and the license granted him was rendered invalid by judgment in the litigation pending between the former licensee and the defendant, the latter would pay the salesman expenses so incurred "but not to exceed $1200.00." This is not proof that the plaintiff actually thereafter incurred such expenses.
 [12a] There is substantial evidence from which the court could have concluded that the plaintiff's reasonably anticipated profits under the subject contracts, after the anticipatory breach became actual, i.e, in July 1960, would have approximated $576,000. The defendant's attack upon the evidence in support of the plaintiff's claimed profit goes to its weight rather than its sufficiency. However, it does appear that the plaintiff's computations in support of his claimed *314 profits did not take into consideration an amortization of his investments; that if he had completed the contracts and received the profits forecast, he would not have received an additional amount equal to his investment which, by the instant judgment, was returned to him as damages; and these circumstances are the basis for the defendant's contention that the judgment in question awards both future profits and restitution.
 [13] "Damages are awarded in an action for breach of contract to give the injured party the benefit of his bargain and insofar as possible to place him in the same position he would have been in had the promisor performed the contract." (Coughlin v. Blair, supra, 41 Cal.2d 587, 603.)
 [12b] If the defendant had not repudiated the contracts in question the plaintiff would not have received both the amount of profits computed in accord with the formula adopted by him and also a return of his investment. However, the finding under consideration, including the interpretation thereof contained in the judge's memorandum, does not support the conclusion that the plaintiff was awarded both his investment under the contracts and the profits therefrom based on the net profit formula used by him in computing the same. In support of this finding it must be assumed that the $12,000 award for loss of profits, which is far less than the amount thereof computed by the plaintiff in accord with his formula, is the result of a computation properly amortizing his investment, to the end that the profit item of the award included only that amount which the plaintiff would have received if the defendant had not breached the contracts. It may not be assumed that the $12,000 figure represents loss of profits calculated in accord with the plaintiff's net profit formula.
 [14, 15] "Findings of fact must be liberally construed to support the judgment ..." (Johndrow v. Thomas, 31 Cal.2d 202, 207 [187 P.2d 681]); in the absence of indications to the contrary, include findings on all special facts necessary to sustain them (Richter v. Walker, 36 Cal.2d 634, 640 [226 P.2d 593]; Greco v. Oregon Mut. Fire Ins. Co., 191 Cal.App.2d 674, 684 [12 Cal.Rptr. 802]); and every inference reasonably deducible from the evidence which will support the same must be accepted. (Hamilton v. Pacific Elec. Ry. Co., 12 Cal.2d 598, 602 [86 P.2d 829]; Church of Merciful Saviour v. Volunteers of America, 184 Cal.App.2d 851, 856 [8 Cal.Rptr. 48].) Adherence to these rules dictates the conclusion heretofore noted. *315
 The defendant also claims that he was entitled to an accounting and that a finding of the trial court to the contrary is error. This contention is based upon the alleged inadequacy of the plaintiff's records; alleged errors therein; alleged failure to account for investment items on hand at the time of trial; and his alleged claim to a share of the profits. All of these factors were matters for consideration at the time of trial as such; the claimed inadequacies and errors concerned the weight to be given the records which were admitted into evidence; there were no profits up to the time of breach and the defendant's right thereto ceased at that time; and the court, in making its award, took into consideration the material and equipment on hand for which credit was allowed in that the evidence showed a total investment, as of December 31, 1959, in excess of $59,000, with assets approximating $6,000, which placed the plaintiff's expenditures in performance at $53,000 in excess of assets, for which he was awarded $36,000. The claim that the court erred in not decreeing an accounting as such has no merit.
 [16] Because of the manner in which the issues in this case were presented, the allegations respecting damage were not clearly defined. The pretrial order set forth one of the issues to be determined as follows: "What is the extent of plaintiff's damage, if any." The case was tried on the basis that loss of future profit was a proper subject of damages. Under the circumstances, no objection can be made to any alleged deficiencies in the pleading raising this issue. [17] In Buxbom v. Smith, supra, 23 Cal.2d 535, 543, the court said that "the matter of pleading becomes unimportant when a case is fairly tried upon the merits and under circumstances which indicate that nothing in the pleadings misled the unsuccessful litigant to his injury." (Cf. Colbert v. Colbert, 28 Cal.2d 276, 281 [169 P.2d 633].) In Alder v. Drudis, supra, 30 Cal.2d 372, damage issues arising out of a breach of contract were decided under a complaint seeking declaratory relief. There is no pleading defect in the instant case which justifies reversal. The finding on the issue of damages covered the ultimate fact and the defendant's contention that it should have been more specific, under the circumstances of this case, is without merit.
 [18] The plaintiff was entitled to recover damages on the basis of his continued performance of the contract up until the anticipatory breach became an actual breach which, as heretofore noted, occurred when he waived his right to seek *316 specific performance and the parties agreed that the contracts should be terminated. There is nothing in the memorandum of the trial judge which indicates that his award of damages was not based upon a consideration of this rule. The defendant's argument that the award made does not take into consideration the profits received by the plaintiff during the interim between the October 1959 renunciation date and the July 1960 termination date is not supported by the evidence, and the inferences reasonably deducible therefrom, viewed in the light most favorable to the subject findings, as directed by the rules heretofore stated. (Cf. Primm v. Primm, 46 Cal.2d 690, 693-694 [299 P.2d 231]; Brewer v. Simpson, supra, 53 Cal.2d 567, 583-584.)
 No contentions have been made with respect to the form of the judgment entered in this action and for this reason we have not detailed its substance; express no opinion respecting its propriety; and have considered it only as it purports to be a judgment for damages.
 The judgment is modified by reducing the amount of damages to $47,289.36, and as modified is affirmed.
 Shepard, Acting P. J., concurred.
