diff options
Diffstat (limited to 'dxr3device.c')
-rw-r--r-- | dxr3device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dxr3device.c b/dxr3device.c index 96644eb..b42ed7f 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -447,7 +447,8 @@ bool cDxr3Device::GrabImage(const char *FileName, bool Jpeg, int Quality, int Si else { ///< write PNM file: - if (fprintf(f, "P6\n%d\n%d\n255\n", w, h) < 0 || fwrite(Data, w * h * 3, 1, f) < 0) + if (fprintf(f, "P6\n%d\n%d\n255\n", w, h) < 0 || + fwrite(Data, w * h * 3, 1, f) != 1) { LOG_ERROR_STR(FileName); } |