Commit eba9622d authored by Benoît Minisini's avatar Benoît Minisini
Browse files

Date formatting with escaped characters works correctly again.

[INTERPRETER]
* BUG: Date formatting with escaped characters works correctly again.
parent f6247616
Pipeline #332807078 passed with stage
in 24 minutes and 54 seconds
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment