X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=divelist.c;h=60ad16a7fe541ced018f03010e732957b6974024;hb=4e876b3082b46913d71e0f9bb6ff084aca4a2184;hp=81779f06d25af2a4e10a05dfa62e953cdec0be7c;hpb=4891fa812f04da1f46075433d28fa0f33145e125;p=ext%2Fsubsurface.git diff --git a/divelist.c b/divelist.c index 81779f0..60ad16a 100644 --- a/divelist.c +++ b/divelist.c @@ -351,8 +351,8 @@ static void get_string(char **str, const char *s) if (!s) s = ""; len = strlen(s); - if (len > 40) - len = 40; + if (len > 60) + len = 60; n = malloc(len+1); memcpy(n, s, len); n[len] = 0; @@ -457,7 +457,8 @@ static void fill_dive_list(void) store = GTK_LIST_STORE(dive_list.model); - for (i = 0; i < dive_table.nr; i++) { + i = dive_table.nr; + while (--i >= 0) { struct dive *dive = dive_table.dives[i]; update_cylinder_related_info(dive);