diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index be1541faaf5..e73d627d67a 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -993,13 +993,13 @@ static int read_lines(bool execute_commands) unsigned long clen; do { - line= my_cgets(tmpbuf.c_ptr(), tmpbuf.alloced_length(), &clen); + line= my_cgets(tmpbuf.ptr(), tmpbuf.alloced_length()-1, &clen); buffer.append(line, clen); /* if we got buffer fully filled than there is a chance that something else is still in console input buffer */ - } while (tmpbuf.alloced_length() <= clen + 1); + } while (tmpbuf.alloced_length() <= clen); line= buffer.c_ptr(); #else /* OS2 */ buffer.length(0); |