8000 Fixed parser bug concerning octal numbers in single quotes. · larkly/postgres-docker@2fabb99 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2fabb99

Browse files
author
Michael Meskes
committed
Fixed parser bug concerning octal numbers in single quotes.
1 parent e4cd7c3 commit 2fabb99

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,11 @@ Wed Jun 12 14:04:11 CEST 2002
12651265

12661266
- Applied Lee Kindness' patch to fix one of memory allocation with
12671267
floating point numbers.
1268+
1269+
Mon Jun 17 15:23:51 CEST 2002
1270+
1271+
- Fixed parser bug in pgc.l. Octal numbers in single quotes are now
1272+
correctly handled.
12681273
- Set ecpg version to 2.10.0.
12691274
- Set library version to 3.4.0.
12701275

src/interfaces/ecpg/preproc/pgc.l

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.92 2002/05/20 09:29:41 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.93 2002/06/17 13:23:27 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -372,13 +372,13 @@ cppline {space}*#(.*\\{space})*.*
372372
<xq>{xqstop} {
373373
BEGIN(state_before);
374374
yylval.str = mm_strdup(literalbuf);
375+
printf("MM: %s\n", yylval.str);
375376
return SCONST;
376377
}
377378
<xq>{xqdouble} { addlitchar('\''); }
378379
<xq>{xqinside} { addlit(yytext, yyleng); }
379380
<xq>{xqescape} { addlit(yytext, yyleng); }
380-
<xq>{xqoctesc} { unsigned char c = strtoul(yytext+1, NULL, 8);
381-
addlitchar(c); }
381+
<xq>{xqoctesc} { addlit(yytext, yyleng); }
382382
<xq>{xqcat} { /* ignore */ }
383383

384384
<xq><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted string"); }

0 commit comments

Comments
 (0)
0