Serial.readBytesUntil() does not work with Termination values > 127

Obvious bug in Stream.cpp - the terminator char argument is cast to int before comparing to the result of timedRead() - the result of the read should be cast to char before the comparison.

    if (c < 0 || c == terminator) break;

should be:

    if (c < 0 || ((char)c) == terminator) break;

Or the clearer:

    if (c == -1 || ((char)c) == terminator) break;

since -1 is the timeout marker returned by timedRead