]> granicus.if.org Git - postgresql/commitdiff
Corrected the check for *message truncated* for the future use.
authorHiroshi Inoue <inoue@tpf.co.jp>
Tue, 19 Jun 2001 03:17:12 +0000 (03:17 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Tue, 19 Jun 2001 03:17:12 +0000 (03:17 +0000)
src/interfaces/odbc/socket.c

index de695058b9c80b6ac4a76f8e6b89cbbefba76ecf..243df4a50140a4e4a5c3bab604b3e885651f8cd6 100644 (file)
@@ -202,7 +202,7 @@ SOCK_get_string(SocketClass *self, char *buffer, int bufsize)
 {
        register int lf = 0;
 
-       for (lf = 0; lf < bufsize; lf++)
+       for (lf = 0; lf < bufsize - 1; lf++)
                if (!(buffer[lf] = SOCK_get_next_byte(self)))
                        return FALSE;