File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -931,6 +931,7 @@ char *linenoiseEditFeed(struct linenoiseState *l) {
931931
932932 char c ;
933933 int nread ;
934+ int ret ;
934935 char seq [3 ];
935936
936937 nread = read (l -> ifd ,& c ,1 );
@@ -940,11 +941,12 @@ char *linenoiseEditFeed(struct linenoiseState *l) {
940941 * there was an error reading from fd. Otherwise it will return the
941942 * character that should be handled next. */
942943 if ((l -> in_completion || c == 9 ) && completionCallback != NULL ) {
943- c = completeLine (l ,c );
944+ ret = completeLine (l ,( unsigned char ) c );
944945 /* Return on errors */
945- if (c < 0 ) return NULL ;
946+ if (ret < 0 ) return NULL ;
946947 /* Read next character when 0 */
947- if (c == 0 ) return linenoiseEditMore ;
948+ if (ret == 0 ) return linenoiseEditMore ;
949+ c = (char )ret ;
948950 }
949951
950952 switch (c ) {
You can’t perform that action at this time.
0 commit comments