File tree 1 file changed +5
-3
lines changed
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) {
931
931
932
932
char c ;
933
933
int nread ;
934
+ int ret ;
934
935
char seq [3 ];
935
936
936
937
nread = read (l -> ifd ,& c ,1 );
@@ -940,11 +941,12 @@ char *linenoiseEditFeed(struct linenoiseState *l) {
940
941
* there was an error reading from fd. Otherwise it will return the
941
942
* character that should be handled next. */
942
943
if ((l -> in_completion || c == 9 ) && completionCallback != NULL ) {
943
- c = completeLine (l ,c );
944
+ ret = completeLine (l ,( unsigned char ) c );
944
945
/* Return on errors */
945
- if (c < 0 ) return NULL ;
946
+ if (ret < 0 ) return NULL ;
946
947
/* Read next character when 0 */
947
- if (c == 0 ) return linenoiseEditMore ;
948
+ if (ret == 0 ) return linenoiseEditMore ;
949
+ c = (char )ret ;
948
950
}
949
951
950
952
switch (c ) {
You can’t perform that action at this time.
0 commit comments