libobs: Fix bug with process piping
The size parameter is the size of the elements, not the size of the data. The size parameter should be 1, and the elements should be the number of bytes. The reason why I'm making this change is because the fread/fwrite would fail when the parameters were swapped.master
parent
336cd7ebe9
commit
43956388b2
|
@ -63,7 +63,7 @@ size_t os_process_pipe_read(os_process_pipe_t *pp, uint8_t *data, size_t len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
return fread(data, len, 1, pp->file);
|
||||
return fread(data, 1, len, pp->file);
|
||||
}
|
||||
|
||||
size_t os_process_pipe_write(os_process_pipe_t *pp, const uint8_t *data,
|
||||
|
@ -76,5 +76,5 @@ size_t os_process_pipe_write(os_process_pipe_t *pp, const uint8_t *data,
|
|||
return 0;
|
||||
}
|
||||
|
||||
return fwrite(data, len, 1, pp->file);
|
||||
return fwrite(data, 1, len, pp->file);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue