diff options
author | unknown <jimw@mysql.com> | 2005-06-08 00:43:57 +0200 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-06-08 00:43:57 +0200 |
commit | f9a80b34c7b55719427b46e98aa51bee26ea08d7 (patch) | |
tree | 2cb223a28fbb6d4bf531197ce7ba653b3f8e9de0 /client | |
parent | d2f3847ab73389c6fd30aba646125a6038936bc4 (diff) | |
download | mariadb-git-f9a80b34c7b55719427b46e98aa51bee26ea08d7.tar.gz |
Fix calculation of buffer size for _cgets() on Windows. (Bug #10841)
client/mysql.cc:
Fix calculation of buffer size for _cgets()
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index a3262c818f3..f7fab85d095 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -972,7 +972,8 @@ static int read_lines(bool execute_commands) *p = '\0'; } #else - linebuffer[0]= (char) sizeof(linebuffer); + /* _cgets() expects the buffer size - 3 as the first byte */ + linebuffer[0]= (char) sizeof(linebuffer) - 3; line= _cgets(linebuffer); #endif /* __NETWARE__ */ #else |