summaryrefslogtreecommitdiff
path: root/src/backend/libpq/hba.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-04-25 00:56:36 +0000
committerBruce Momjian <bruce@momjian.us>2002-04-25 00:56:36 +0000
commit6cdba03d38a71e58576dd2615dc6897bbfdb133d (patch)
tree4ffc073b92fe89267981486510c4c1c2a100863f /src/backend/libpq/hba.c
parent39e77dd36546d24ffb2b6f307f26f19a2f6bafed (diff)
Fix password code to deal with new quoting code.
Diffstat (limited to 'src/backend/libpq/hba.c')
-rw-r--r--src/backend/libpq/hba.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index fce63ab2436..5e97d132b2a 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.81 2002/04/04 04:25:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.82 2002/04/25 00:56:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -109,9 +109,6 @@ next_token(FILE *fp, char *buf, const int bufsz)
while (c != EOF && c != '\n' &&
(!isblank(c) || in_quote == true))
{
- if (c == '"')
- in_quote = !in_quote;
-
/* skip comments to EOL */
if (c == '#' && !in_quote)
{
@@ -138,11 +135,14 @@ next_token(FILE *fp, char *buf, const int bufsz)
break;
/* Literal double-quote is two double-quotes */
- if (c == '"')
+ if (in_quote && c == '"')
was_quote = !was_quote;
else
was_quote = false;
+ if (c == '"')
+ in_quote = !in_quote;
+
c = getc(fp);
}