Added value range assertions to prevent static analysis false-positives on Clang.
Fixed parameter type mismatch in StreamReader.