A bug in the validation part of `ASCIIFlatString::substring` caused some substrings to be created with a negative length, which could be the cause of various negative side-effects.
In the example added in the substring test, this caused `stdout` to close due to a call to `fwrite` with a negative count, which was in turn converted to unsigned (I suspect this is undefined behaviour), provoking the closure of the stream in the nit part.
Reported by @Morriar
Close #2089
Pull-Request: #2091
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Jean Privat <jean@pryen.org>