forked from espressif/esp-idf
fix(console): Default read_func to the read function
To make sure the static function pointer read_func is never NUL, set its default value to th read function instead of setting it to NULL pointer.
This commit is contained in:
@@ -238,7 +238,7 @@ static void flushWrite(void) {
|
|||||||
fsync(fileno(stdout));
|
fsync(fileno(stdout));
|
||||||
}
|
}
|
||||||
|
|
||||||
static linenoise_read_bytes_fn read_func = NULL;
|
static linenoise_read_bytes_fn read_func = read;
|
||||||
void linenoiseSetReadFunction(linenoise_read_bytes_fn read_fn)
|
void linenoiseSetReadFunction(linenoise_read_bytes_fn read_fn)
|
||||||
{
|
{
|
||||||
read_func = read_fn;
|
read_func = read_fn;
|
||||||
|
Reference in New Issue
Block a user