summaryrefslogtreecommitdiffstats
path: root/divesite.c
diff options
context:
space:
mode:
Diffstat (limited to 'divesite.c')
-rw-r--r--divesite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/divesite.c b/divesite.c
index cd8ee8a7d..547b6b0dd 100644
--- a/divesite.c
+++ b/divesite.c
@@ -176,7 +176,7 @@ void copy_dive_site(struct dive_site *orig, struct dive_site *copy)
} else {
if (copy->taxonomy.category == NULL)
copy->taxonomy.category = alloc_taxonomy();
- for (int i = 0; i < NR_CATEGORIES; i++) {
+ for (int i = 0; i < TC_NR_CATEGORIES; i++) {
free((void *)copy->taxonomy.category[i].value);
copy->taxonomy.category[i] = orig->taxonomy.category[i];
copy->taxonomy.category[i].value = copy_string(orig->taxonomy.category[i].value);