Thanks, I was able to reproduce this. It turns out it was due to compiler optimization. I had been testing this in a debug version of mIRC (sorry about that, I should have tried the release version first) which was returning the correct results. When I tested in a release version, the issue was present. An identical issue for $inellipse() was fixed in v6.31 but it looks like it was reintroduced after moving to a newer version of Visual Studio for mIRC v7.x. This issue has been fixed for the next version.