On Sat, Apr 5, 2014 at 8:16 PM, Dirk Hohndel <[email protected]> wrote:
> On Sat, 2014-04-05 at 14:15 +0530, Venkatesh Shukla wrote: > > Arguments 2 and 3 in fread() seemed to be exchanged because of which > > only one character was read into the temp xml file. > > Fixed it by exchange and replacing 1 by sizeof(char) to be sure. > > > > > > Signed-off-by: Venkatesh Shukla <[email protected]> > > --- > > qt-ui/subsurfacewebservices.cpp | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/qt-ui/subsurfacewebservices.cpp > > b/qt-ui/subsurfacewebservices.cpp > > index b231173..e49cec9 100644 > > --- a/qt-ui/subsurfacewebservices.cpp > > +++ b/qt-ui/subsurfacewebservices.cpp > > @@ -159,7 +159,7 @@ bool > > DivelogsDeWebServices::prepare_dives_for_divelogs(const QString > > &tempfile, > > > This patch got linewrapped. Please either attach patches or configure > your mail program so that it doesn't line wrap. > > I could of course fix things up by hand but that isn't the point, is it? > Also, when you resubmit you could include the > ACKed-by: Lubomir... > line :-) > > /D > > I am attaching the updated patch. -- *Venkatesh Shukla *
From 7ca840395c42aaa6b38701be86f8bbbca3f1aa13 Mon Sep 17 00:00:00 2001 From: Venkatesh Shukla <[email protected]> Date: Sat, 5 Apr 2014 20:30:46 +0530 Subject: [PATCH] Fixes divelogs.de upload error #483 Arguments 2 and 3 in fread() seemed to be exchanged because of which only one character was read into the temp xml file. Fixed it by exchange and replacing 1 by sizeof(char) to be sure. Signed-off-by: Venkatesh Shukla <[email protected]> Acked-by: Lubomir I. Ivanov <[email protected]> --- qt-ui/subsurfacewebservices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 7077465..d855223 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 || (streamsize = fread(membuf, streamsize, 1, f)) == 0) { + if (!membuf || (streamsize = fread(membuf, sizeof (char), streamsize, f)) == 0) { report_error(tr("internal error: %s").toUtf8(), qt_error_string().toUtf8().data()); fclose(f); free((void *)membuf); -- 1.9.0
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
