Fix type conversion error breaking large files

CHKs are 32kb ... so yes, there's a limit somewhere around 128TB files; is that a problem?

IMHO the patch (casting) is fine.