From 2b7806a5e3ce0dc84fc879ae5d87344a5962817c Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Thu, 26 Apr 2007 20:15:28 +0000 Subject: [PATCH] Fix a bug which checking join is confused by CR+LF. --- convert.c | 8 ++++++-- version.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/convert.c b/convert.c index baa3962..22d6efe 100644 --- a/convert.c +++ b/convert.c @@ -2038,10 +2038,14 @@ check_join(StatementClass *stmt, const char *curptr, size_t curpos) { const char *wstmt; ssize_t stapos, endpos, tokenwd; - const int backstep = 5; + const int backstep = 4; BOOL outerj = TRUE; - for (endpos = curpos - backstep, wstmt = curptr - backstep; endpos >= 0 && isspace((UCHAR) *wstmt); endpos--, wstmt--) + for (endpos = curpos, wstmt = curptr; endpos >= 0 && isspace((UCHAR) *wstmt); endpos--, wstmt--) + ; + if (endpos < 0) + return FALSE; + for (endpos -= backstep, wstmt -= backstep; endpos >= 0 && isspace((UCHAR) *wstmt); endpos--, wstmt--) ; if (endpos < 0) return FALSE; diff --git a/version.h b/version.h index 23ad8ad..dc9b610 100644 --- a/version.h +++ b/version.h @@ -12,6 +12,6 @@ #define POSTGRESDRIVERVERSION "08.02.0400" #define POSTGRES_RESOURCE_VERSION "08.02.0400\0" #define PG_DRVFILE_VERSION 8,2,04,00 -#define PG_BUILD_VERSION "200704260001" +#define PG_BUILD_VERSION "200704280001" #endif -- 2.39.5