@Happiness,
Sounds like you made the right decision on getting out, well done.
As far as i know, having an affair is
not illegal
However, that does depend on which country your in.
It is not illegal in most western countries nor in most countries of the European Union, including the UK, Austria, the Netherlands, Belgium, Finland or Sweden.
In the United States, laws vary from state to state. In those states where adultery is still on the statute book (although rarely prosecuted), penalties vary from life sentence (Michigan), to a fine of $10 (Maryland), to a Class I felony (Wisconsin)
In some East Asian countries, including Korea, and Taiwan, adultery continues to be a crime. In the Philippines, adultery is considered a crime. Adultery is not a crime in China, but is grounds for divorce.
In some places, such as Iran and Saudi Arabia,the method of punishment for adultery is stoning to death. (This rairly happens)
In Pakistan, it is also a crime and the maximum penalty is death... but that's not ever happened. People are imprisioned and such though.
In India, men can be arrested for adultury but not women.
(According to Wiki)
BUTTTT
If your simply talking to this man, and there is no sexual contact or what not, you're not having an affair. Most people call it friendship.
Good luck.
A-M