summaryrefslogtreecommitdiffstats
path: root/divesite.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-04 08:45:45 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-04 08:45:45 -0700
commitf8a3a8521003a26525b658840ce8e7bfd3f7b141 (patch)
treeec99f02c732c3c39fbf9e2dbae7dc0ec4689fdd6 /divesite.c
parent37aebe0b2e584c4d63e5c01c9bab0e1a8385acf1 (diff)
downloadsubsurface-f8a3a8521003a26525b658840ce8e7bfd3f7b141.tar.gz
Fix potential crash using std::sort
It's entirely unclear why std::sort sometimes accesses the element with index -1. In my limited testing switching to qSort avoids that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divesite.c')
-rw-r--r--divesite.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/divesite.c b/divesite.c
index f7f6afea1..fbf01bf77 100644
--- a/divesite.c
+++ b/divesite.c
@@ -103,7 +103,6 @@ uint32_t create_dive_site(const char *name)
uint32_t create_dive_site_with_gps(const char *name, degrees_t latitude, degrees_t longitude)
{
struct dive_site *ds = alloc_dive_site();
- ds->uuid = dive_site_getUniqId();
ds->name = copy_string(name);
ds->latitude = latitude;
ds->longitude = longitude;