Legally and practically are very different things. Is it a big company? They can and do absolutely get away with voiding your warranty like that because almost no one can afford to sue them, and if they can afford it, they’re probably just going to buy a replacement.