summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-06-08 00:43:57 +0200
committerjimw@mysql.com <>2005-06-08 00:43:57 +0200
commit9ba4a6c7220998a051df35dbc1e85c90d8b14fb4 (patch)
tree2cb223a28fbb6d4bf531197ce7ba653b3f8e9de0 /client
parenteb9e5777ee7608d151ff44fefef587e47a9f74d4 (diff)
downloadmariadb-git-9ba4a6c7220998a051df35dbc1e85c90d8b14fb4.tar.gz
Fix calculation of buffer size for _cgets() on Windows. (Bug #10841)
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc3
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