diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 25aa56cb2..abf486035 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -159,7 +159,7 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, rewind(f); membuf = (char *)malloc(streamsize + 1); - if (!membuf || !fread(membuf, streamsize, 1, f)) { + if (!membuf || (streamsize = fread(membuf, streamsize, 1, f)) == 0) { *errorMsg = tr("internal error: %1").arg(qt_error_string()); fclose(f); free((void *)membuf); |