Fixed problem with preset string containing '%'
SVN revision: 1793
This commit is contained in:
+4
-5
@@ -5127,8 +5127,8 @@ int el_lock_message(LOGBOOK * lbs, int message_id, char *user)
|
||||
|
||||
void write_logfile(LOGBOOK * lbs, const char *text)
|
||||
{
|
||||
char file_name[2000];
|
||||
char str[10000], unm[256];
|
||||
char file_name[MAX_PATH_LENGTH];
|
||||
char str[MAX_PATH_LENGTH], unm[256];
|
||||
int fh;
|
||||
time_t now;
|
||||
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);
|
||||
|
||||
/* check for index substitution */
|
||||
if (!bedit && (strchr(preset, '%') || strchr(preset, '#'))) {
|
||||
if (!bedit && strchr(preset, '#')) {
|
||||
/* get index */
|
||||
get_auto_index(lbs, index, preset, str, sizeof(str));
|
||||
strcpy(preset, str);
|
||||
}
|
||||
|
||||
if (!strchr(preset, '%'))
|
||||
strcpy(attrib[index], preset);
|
||||
strcpy(attrib[index], preset);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user