summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-04-11 19:45:25 -0400
committerMathias Stearn <mathias@10gen.com>2011-04-11 19:45:25 -0400
commitfc0500e539ef912002631d9deb23a3f153b81c44 (patch)
tree6ff4c5e4c1518ae445a082c5e4f2fb304b62aba2 /third_party
parent7dee30b39fc0b69914923f029811c77a22dae141 (diff)
downloadmongo-fc0500e539ef912002631d9deb23a3f153b81c44.tar.gz
fix completeLine SERVER-1763
Diffstat (limited to 'third_party')
-rw-r--r--third_party/linenoise/linenoise.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/linenoise/linenoise.cpp b/third_party/linenoise/linenoise.cpp
index 4b9923ab147..fc5757ca223 100644
--- a/third_party/linenoise/linenoise.cpp
+++ b/third_party/linenoise/linenoise.cpp
@@ -386,7 +386,9 @@ static int completeLine(int fd, const char *prompt, char *buf, size_t buflen, si
refreshLine(fd,prompt,buf,*len,*pos,cols);
}
- c = linenoiseReadChar(fd);
+ do {
+ c = linenoiseReadChar(fd);
+ } while (c == (char)-1);
switch(c) {
case 0: