The words of a Teacher must be listened in great attention and empathy; never take them literally. You will always otherwise misinterpret.
What is the definition of adultery?
Adultery does not mean that you are hanging out with somebody else’s wife. Adultery means that you are now taking something as a high priority and that something can never be God.
That is the real definition of adultery: To be disloyal to God.