delivered the Opinion of the Court.
This is an action to quiet title to certain described land situated in Lewis and Clark County. It was commenced on March 8, 1955.
Plaintiff recovered judgment and defendant has appealed therefrom. The following facts appear. In 1933, defendant Sanborn claimed to be the owner of the property in question, and on April 3, 1933, he leased it to Johnstone by a written lease. Johnstone took possession and has ever since occupied the premises. Before the lease was made and some time in 1931 the property had been sold for delinquent taxes and a tax sale certificate dated July 24, 1931, had been issued. The lease contained this paragraph:
“It is understood and agreed that there are now delinquent taxes against this property and that if Lessor is unable to pay *469the taxes or should lose possession of the property, this lease shall be immediately terminated and Lessor shall not be responsible for any -work theretofore done by Lessee.”
On December 31, 1935, the county took a tax deed. On February 26, 1936, Johnstone entered into a contract to purchase the property from the county. He completed payment on the contract and obtained a deed from the county on May 11, 1940.
In 1941, the tax deed issued on December 31, 1935, was held by this court to be invalid. Sanborn v. Lewis and Clark County, 113 Mont. 1, 120 P.2d 567. This court affirmed the district court’s order that $1,213.41 be deposited by Sanborn to protect Johnstone for taxes paid and costs of improvements made on the premises and expenditures for the protection of the property. Thereafter, the district court made an order requiring* Sanborn to make additional deposits under section 2214, R.C.M. 1935 (now R.C.M. 1947, § 84-4158). A petition for modification of that order was filed and also a motion to strike the petition for modification. These motions and petitions were broug'ht on for hearing in the district court on January 11, 1957. Johnstone then filed a motion to dismiss the proceeding for want of diligent prosecution. The district court denied the motion to dismiss, but this court ruled it should have been granted with prejudice. State ex rel. Johnstone v. District Court, 132 Mont. 377, 319 P.2d 957. That opinion was rendered on November 14, 1957, which was more than two years after this action was commenced. The district court in the instant ease ruled in substance that Johnstone became the owner of the property by adverse possession.
Counsel for Sanborn contend that the issue of adverse possession cannot be determined in favor of Johnstone because of the provisions of section 93-2512, reading:
“When the relation of landlord and tenant has existed between any persons, the possession of the tenant is deemed the possession of the landlord until the expiration of ten years *470from the termination of the tenancy, or, where there has been no written lease, until the expiration of ten years from the time of the last payment of rent, notwithstanding such tenant ■may have acquired another title, or may have claimed to hold adversely to his landlord. But such presumptions cannot be made after the periods prescribed in this section.”
That section of the statute was designed to prevent the lessee from questioning the title of his landlord.
Here, by the very terms of the lease, Sanborn pointed out the weakness and the precarious nature of his title. To all intents and purposes he invited Johnstone to take whatever steps he desired to acquire title adverse to that of Sanborn in the event that the latter lost the right of possession or failed to redeem the property by paying the delinquent taxes. He was unwilling to assume all the burdens and responsibilities of a landlord under the circumstances, since he was unwilling to stand responsible for improvements made by Johnstone as a tenant. In legal effect, Sanborn by the terms of the lease, waived the benefit of section 93-2512.
It is, of course, permissible for a party to waive the advantage of a law intended solely for his benefit. Section 49-105.
In reaching the foregoing conclusion, we have assumed, without so deciding, that section 93-2512 is valid. There is considerable doubt whether such a statute is valid in view of the holding in Lowery v. Garfield County, 122 Mont. 571, 208 P.2d 478. In the Lowery case, this court held that it was not competent for the Legislature to pass a special statute fixing a short statute of limitations applicable to only certain persons and individuals, leaving all others in the same circumstances subject to the general statute of limitations. It would seem that for the same reasons, the Legislature may not pass a special act fixing a long statute of limitations, applicable only to certain persons, leaving all others subject to the general statute of limitations.
*471Section 93-2512, in substance, requires adverse possession for twenty years, as against a landlord whereas, if a servant takes possession of land with the consent of the owner he may obtain title by adverse possession in ten years (now five years under section 93-2507) by repudiating the relationship and giving-notice thereof to the owner. 2 C.J.S. Adverse Possession § 88, p. 645. The same is true as to any other relationship except that of landlord and tenant. As above indicated we do not pass upon the constitutionality of section 93-2512, but it can be readily seen that there is serious question regarding its validity.
Also, for another reason the judgment of the trial court must be upheld. It is well-settled that if the result reached by the trial court be correct, it will be upheld regardless of the reasons given for the conclusion.
Here the record of prior litigation between these parties, and which was made a part of the record in this case by stipulation, shows that on May 25, 1944, Judge Horsky entered an order requiring Sanborn to pay to Johnstone the sum of $1,-213.41 together with the sum of $2,041.29. The order recited, in substance, that if Sanborn refused to deposit the money with the clerk of the district court by June 20, 1944, the title would be quieted in Johnstone as provided in what is now section 84-4158, but if the deposit was made title would be quieted in Sanborn.
The deposit was not made as required by that order. The time to make the deposit was never extended. The validity of that order was never assailed. Litigation questioning the amount of the required deposit was not prosecuted with reasonable diligence and the proceeding was dismissed for want of prosecution. In consequence title should be quieted in Johnstone pursuant to the order of Judge Horsky. No other conclusion is permissible under the record from that arrived at by the trial court.
The judgment is accordingly affirmed.
*472ME. CHIEF JUSTICE HAEEISON and ME. JUSTICES BOTTOMLY and CASTLES concur.