mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed problem with auto indices
SVN revision: 2216
This commit is contained in:
parent
2ade7175ba
commit
cb49a54ee6
11
src/elogd.c
11
src/elogd.c
@ -8729,13 +8729,10 @@ void get_auto_index(LOGBOOK * lbs, int index, char *format, char *retstr, int si
|
||||
el_retrieve(lbs, message_id, NULL, attr_list, attrib, lbs->n_attr, NULL, 0, NULL, NULL, att, NULL,
|
||||
NULL);
|
||||
|
||||
/* if date part changed, start over with index */
|
||||
if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) != 0)
|
||||
old_index = 0;
|
||||
else
|
||||
/* retrieve old index */
|
||||
if (atoi(attrib[index] + loc) > old_index)
|
||||
old_index = atoi(attrib[index] + loc);
|
||||
/* if same date found, obtain largest index */
|
||||
if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) == 0)
|
||||
if (atoi(attrib[index] + loc) > old_index)
|
||||
old_index = atoi(attrib[index] + loc);
|
||||
|
||||
message_id = el_search_message(lbs, EL_PREV, message_id, FALSE);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user