Skip to content

Commit b1e929f

Browse files
committed
Fix pointer-advancement bugs in MS and US cases of new to_timestamp() code.
Alex Hunsaker
1 parent 3d8fd75 commit b1e929f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/utils/adt/formatting.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.147 2008/09/11 17:32:34 tgl Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.148 2008/09/26 15:35:28 tgl Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2008, PostgreSQL Global Development Group
@@ -2537,7 +2537,7 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out)
25372537
out->ms *= len == 1 ? 100 :
25382538
len == 2 ? 10 : 1;
25392539

2540-
s += len + SKIP_THth(n->suffix);
2540+
s += SKIP_THth(n->suffix);
25412541
break;
25422542
case DCH_US: /* microsecond */
25432543
len = from_char_parse_int_len(&out->us, &s, 6, n);
@@ -2548,7 +2548,7 @@ DCH_from_char(FormatNode *node, char *in, TmFromChar *out)
25482548
len == 4 ? 100 :
25492549
len == 5 ? 10 : 1;
25502550

2551-
s += len + SKIP_THth(n->suffix);
2551+
s += SKIP_THth(n->suffix);
25522552
break;
25532553
case DCH_SSSS:
25542554
from_char_parse_int(&out->ssss, &s, n);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy