Closed rgson closed 5 years ago
The precedence of && is higher than ||, leading to the \r check being evaluated even on zero-length strings (against string index -1). Explicitly grouping the \n and \r checks prevents this.
Thanks!
The precedence of && is higher than ||, leading to the \r check being evaluated even on zero-length strings (against string index -1). Explicitly grouping the \n and \r checks prevents this.