X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=divelist.c;h=93ea34f6368a13735dc9c210cc2e1ef3c30b1b63;hb=1268e0d22597593e3276ffa574e7eeb679d0dbd2;hp=bf853ec0e49fce534853c3b59e98abb0d9a314a1;hpb=97a1dd68306de17aa73be092d2bcf174e8158f62;p=ext%2Fsubsurface.git diff --git a/divelist.c b/divelist.c index bf853ec..93ea34f 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);