Link: Fixed signed/unsigned comparison when computing number of bytes to read by jhh67 · Pull Request #20383 · chapel-lang/chapel · GitHub
Merge pull request #20383 from jhh67/io-num
Fixed signed/unsigned comparison when computing number of bytes to read
When computing the number of bytes remaining to be read in the file the current file offset was subtracted from the current file length. The length may be less than the offset because the file size may change. Previously, the difference was assigned to an unsigned integer that was compared against zero, leading to a conditional that was always false. Now the comparison is done prior to the assignment.
[Minor change, not reviewed]
Modified Files: M runtime/src/qio/qio_formatted.c Compare: https://github.com/chapel-lang/chapel/compare/af2e5606accc...dd9d9b238e05