If input contains the binary record we can't have it modified during read. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/tests/replay.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Changes since v1: - open file passed with name in binary mode too. diff --git a/server/tests/replay.c b/server/tests/replay.c index cbb1c195..b88c03c7 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -392,8 +392,11 @@ int main(int argc, char **argv) if (strncmp(file[0], "-", 1) == 0) { fd = stdin; +#ifdef _WIN32 + _setmode(fileno(fd), _O_BINARY); +#endif } else { - fd = fopen(file[0], "r"); + fd = fopen(file[0], "rb"); } if (fd == NULL) { g_printerr("error opening %s\n", file[0]); -- 2.20.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel