functions btrim() ltrim() and rtrim().
The error was that the character after the set was included
in the tests (ptr2 pointed to the character after the vardata
part of set if no match found, so comparing *ptr or *end
against *ptr2 MAY match -> strip).
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. # # Let's break this rule - forgive me.
# #======================================== jwieck@debis.com (Jan
Wieck) #
/*
* Edmund Mergl <E.Mergl@bawue.de>
*
- * $Id: oracle_compat.c,v 1.14 1998/06/15 19:29:36 momjian Exp $
+ * $Id: oracle_compat.c,v 1.15 1998/08/11 18:38:07 momjian Exp $
*
*/
break;
++ptr2;
}
- if (*ptr != *ptr2)
+ if (ptr2 > end2)
break;
ptr++;
ptr2 = VARDATA(set);
break;
++ptr2;
}
- if (*end != *ptr2)
+ if (ptr2 > end2)
break;
--end;
ptr2 = VARDATA(set);
break;
++ptr2;
}
- if (*ptr != *ptr2)
+ if (ptr2 > end2)
break;
ptr++;
ptr2 = VARDATA(set);
break;
++ptr2;
}
- if (*ptr != *ptr2)
+ if (ptr2 > end2)
break;
--ptr;
ptr2 = VARDATA(set);