mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
37aebe0b2e
commit
f8a3a85210
2 changed files with 3 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue