fixup! fix: ensure all bytes read / written to file (#2682) (#2780)

fix: infinite loop when pread returns 0
This commit is contained in:
Charles Kerr
2022-03-17 10:41:02 -05:00
committed by GitHub
parent 54ef7341a2
commit ce10a5314a

View File

@@ -786,7 +786,7 @@ bool tr_sys_file_read_at(
static_assert(sizeof(*bytes_read) >= sizeof(my_bytes_read));
if (my_bytes_read != -1)
if (my_bytes_read > 0)
{
if (bytes_read != nullptr)
{