Indeed. Sodomy laws worked the same way: somebody said you were gay, and if the cop thought you were gay then you were arrested, and the trial consisted of someone pointing and saying "you're gay" and then convicting you.
Obviously, this was not universally enforced, just against undesirables.