diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-02-12 12:27:55 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-02-12 12:29:35 -0800 |
commit | a6336d13b302d071bc94cc15b4a865f0ba2492f7 (patch) | |
tree | 56a1a58ed8b14e7a32c2148b99d15022ea0e9527 /divesite.c | |
parent | 0e6345f65b041b5005c75b83792ca98d8ef4f766 (diff) | |
download | subsurface-a6336d13b302d071bc94cc15b4a865f0ba2492f7.tar.gz |
Don't ever create a dive site without valid uuid
If you want a specific one, you can always overwrite it, but a dive site
with a uuid of 0 breaks some of our assumptions.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divesite.c')
-rw-r--r-- | divesite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/divesite.c b/divesite.c index c3bb45950..c9dbb095a 100644 --- a/divesite.c +++ b/divesite.c @@ -33,6 +33,7 @@ struct dive_site *alloc_dive_site() exit(1); sites[nr] = ds; dive_site_table.nr = nr + 1; + ds->uuid = dive_site_getUniqId(); return ds; } @@ -40,7 +41,6 @@ struct dive_site *alloc_dive_site() uint32_t create_dive_site(const char *name) { struct dive_site *ds = alloc_dive_site(); - ds->uuid = dive_site_getUniqId(); ds->name = copy_string(name); return ds->uuid; |