From 0ce37b39b66a6a44a87c5272ff55af3664884f02 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 2 Jul 2018 19:58:26 +0200 Subject: [PATCH] error handling in Save_PI1() Signed-off-by: Thomas Bernard --- src/miscfileformats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/miscfileformats.c b/src/miscfileformats.c index 25408419..9e65079c 100644 --- a/src/miscfileformats.c +++ b/src/miscfileformats.c @@ -1703,7 +1703,8 @@ void Save_PI1(T_IO_Context * context) if (context->Color_cycles) { PI1_save_ranges(context, buffer, 32); - Write_bytes(file,buffer,32); + if (!Write_bytes(file,buffer,32)) + File_error=1; } fclose(file); }