Commit 8c1c63c5fdbdc7540d21522d735501f81b3ae80c

Yossi Gottlieb 2020-03-12T14:48:36

Fix compilation in non C99/C11 mode.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/linenoise.c b/linenoise.c
index 01c3b93..ade4dea 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -598,7 +598,8 @@ static void refreshMultiLine(struct linenoiseState *l) {
     /* Write the prompt and the current buffer content */
     abAppend(&ab,l->prompt,strlen(l->prompt));
     if (maskmode == 1) {
-        for (uint i = 0; i < l->len; i++) abAppend(&ab,"*",1);
+        uint i;
+        for (i = 0; i < l->len; i++) abAppend(&ab,"*",1);
     } else {
         abAppend(&ab,l->buf,l->len);
     }