From e46688d694d33f445ecb2368541898613af0f3b3 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 21 Aug 2012 15:37:38 -0700 Subject: Fix single-dive editing oddity The multi-dive case does fine, but the single-dive case (used when adding a dive, for example) was somewhat confused between the dive index (which is the location in the dive array) and the dive number. Fix this by just passing the dive pointer instead (where NULL means to use the current dive selection). Reported-by: Jacco van Koll Root-caused-by: Dirk Hohndel Signed-off-by: Linus Torvalds --- dive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dive.h') diff --git a/dive.h b/dive.h index cc27ab861..7ceab643a 100644 --- a/dive.h +++ b/dive.h @@ -355,7 +355,7 @@ extern void evn_foreach(void (*callback)(const char *, int *, void *), void *dat extern int add_new_dive(struct dive *dive); extern int edit_dive_info(struct dive *dive); -extern int edit_multi_dive_info(int idx); +extern int edit_multi_dive_info(struct dive *single_dive); extern void dive_list_update_dives(void); extern void flush_divelist(struct dive *dive); -- cgit v1.2.3-70-g09d2