mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed problem with preset string containing '%'
SVN revision: 1793
This commit is contained in:
parent
7d81805680
commit
15c0a2b939
@ -5127,8 +5127,8 @@ int el_lock_message(LOGBOOK * lbs, int message_id, char *user)
|
|||||||
|
|
||||||
void write_logfile(LOGBOOK * lbs, const char *text)
|
void write_logfile(LOGBOOK * lbs, const char *text)
|
||||||
{
|
{
|
||||||
char file_name[2000];
|
char file_name[MAX_PATH_LENGTH];
|
||||||
char str[10000], unm[256];
|
char str[MAX_PATH_LENGTH], unm[256];
|
||||||
int fh;
|
int fh;
|
||||||
time_t now;
|
time_t now;
|
||||||
char buf[10000];
|
char buf[10000];
|
||||||
@ -8691,14 +8691,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
strsubst_list(preset, sizeof(preset), slist, svalue, i);
|
strsubst_list(preset, sizeof(preset), slist, svalue, i);
|
||||||
|
|
||||||
/* check for index substitution */
|
/* check for index substitution */
|
||||||
if (!bedit && (strchr(preset, '%') || strchr(preset, '#'))) {
|
if (!bedit && strchr(preset, '#')) {
|
||||||
/* get index */
|
/* get index */
|
||||||
get_auto_index(lbs, index, preset, str, sizeof(str));
|
get_auto_index(lbs, index, preset, str, sizeof(str));
|
||||||
strcpy(preset, str);
|
strcpy(preset, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strchr(preset, '%'))
|
strcpy(attrib[index], preset);
|
||||||
strcpy(attrib[index], preset);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user