Yes, you wasn't hacked (and can just report the comment with the link as 'spam'); you would only get hacked if you clicked the link and typed in your login information (or, in rarer cases, if you were hacked directly) - having the comment with the hacking link itself will do you no harm, you are safe.