[PATCH] Fix bug in Seabear Quirks

Anton Lundin glance at acc.umu.se
Wed Jul 9 22:27:09 PDT 2014


By mistake i used memcpy to "fix" the samples, but the sample list was
overlapping so i needed to use memmove.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 qt-ui/divelogimportdialog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index f9452e8..403438e 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -102,7 +102,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
 		}
 
 		/* And the two first samples are "settings" from there software */
-		memcpy(dive->dc.sample, dive->dc.sample + 2, sizeof(dive->dc.sample) * dive->dc.samples - 2);
+		memmove(dive->dc.sample, dive->dc.sample + 2, sizeof(dive->dc.sample) * dive->dc.samples - 2);
 		dive->dc.samples -= 2;
 		memset(dive->dc.sample + dive->dc.samples, 0, sizeof(dive->dc.sample) * 2);
 
-- 
1.9.1



More information about the subsurface mailing list