• Show log

    Commit

  • Hash : e153bd83
    Author : Nick Gasson
    Date : 2014-01-06T11:04:02

    Fix escape sequence processing when only one byte available The read call in the escape sequence processing does not handle the case where only the first byte is available. This can happen for example on a slow serial terminal. Comment by @antirez: I reworked the code for brevity, for historical reasons here is the proposed patch. I believe my fix should be functionally equivalent. Original fix: case 27: /* escape sequence */ /* Read the next two bytes representing the escape sequence. */ - if (read(fd,seq,2) == -1) break; + { + ssize_t b = read(fd, seq, 2); + + if (b < 0) break; + + if (b == 1) { + b = read(fd,&seq[1], 1); + if (b != 1) { + break; + } + } + } See PR #47.

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/linenoise.git
    Git SSH git@git.kmx.io:kc3-lang/linenoise.git
    Public access ? public
    Description

    A minimal, zero-config, BSD licensed, readline replacement used in Redis, MongoDB, and Android.

    Users
    thodg_l kc3_lang_org thodg_w thodg_m thodg www_kmx_io
    Tags