Date formatting with escaped characters works correctly again.
[INTERPRETER] * BUG: Date formatting with escaped characters works correctly again.
This commit is contained in:
parent
f6247616ca
commit
eba9622d5e
2 changed files with 8 additions and 10 deletions
|
@ -4029,7 +4029,7 @@ static void _break(ushort code)
|
|||
|
||||
//fprintf(stderr, "%s %d\n", DEBUG_get_current_position(), DEBUG_info->watch);
|
||||
|
||||
if (CP && CP->component == NULL)
|
||||
if (CP) // && CP->component == NULL)
|
||||
{
|
||||
if (EXEC_profile_instr)
|
||||
DEBUG.Profile.Add(CP, FP, PC);
|
||||
|
|
|
@ -1875,16 +1875,14 @@ bool LOCAL_format_date(const DATE_SERIAL *date, int fmt_type, const char *fmt, i
|
|||
{
|
||||
c = fmt[pos];
|
||||
|
||||
if (quote)
|
||||
{
|
||||
COMMON_put_char(c);
|
||||
quote = FALSE;
|
||||
continue;
|
||||
}
|
||||
else if (c == '\\')
|
||||
if (c == '\\')
|
||||
{
|
||||
pos++;
|
||||
c = fmt[pos];
|
||||
if (!c)
|
||||
break;
|
||||
c = 1; // something not null that cannot be a token
|
||||
quote = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == token)
|
||||
|
@ -1926,7 +1924,7 @@ bool LOCAL_format_date(const DATE_SERIAL *date, int fmt_type, const char *fmt, i
|
|||
else
|
||||
{
|
||||
if (c != ' ' || token == 0 || COMMON_pos > 0)
|
||||
COMMON_put_char(c);
|
||||
COMMON_put_char(quote ? fmt[pos] : c);
|
||||
}
|
||||
|
||||
token = 0;
|
||||
|
|
Loading…
Reference in a new issue