Fix a bug which checking join is confused by CR+LF.
authorHiroshi Inoue <inoue@tpf.co.jp>
Thu, 26 Apr 2007 20:15:28 +0000 (20:15 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Thu, 26 Apr 2007 20:15:28 +0000 (20:15 +0000)
convert.c
version.h

index baa3962d76994cb0c784f9ddc58d5a3c167a3eca..22d6efe68f04cd2f63bc4bf3400029750015b17b 100644 (file)
--- 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;
index 23ad8ad10e222605bb64268665d1c4f1e0a93cd6..dc9b610b3cb3acdabb7815817bbf823db4abfa75 100644 (file)
--- 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