fix Issue 9617 - ulong.max is wrongly accepted by smaller signed parameter
Merge pull request #1704 from 9rnsr/fix9617

Issue 9617 - ulong.max is wrongly accepted by smaller signed parameter