returns non-zero, not -1
Merge pull request #383 from WalterBright/b1

returns non-zero, not -1