[Spice-devel] [PATCH spice-gtk 2/4] spicy-screenshot: Open output file as binary
Frediano Ziglio
fziglio at redhat.com
Wed Dec 19 13:25:13 UTC 2018
On Windows this prevents LFs to be written as CR+LF.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
tools/spicy-screenshot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/spicy-screenshot.c b/tools/spicy-screenshot.c
index 9d7aa34b..0bfd3ca2 100644
--- a/tools/spicy-screenshot.c
+++ b/tools/spicy-screenshot.c
@@ -53,7 +53,7 @@ static int write_ppm_32(void)
uint8_t *p;
int n;
- fp = fopen(outf,"w");
+ fp = fopen(outf,"wb");
if (NULL == fp) {
fprintf(stderr, "%s: can't open %s: %s\n", g_get_prgname(), outf, strerror(errno));
return -1;
--
2.17.2
More information about the Spice-devel
mailing list