Nice catch. I don't like the fix though. As the string is being iterated through, surely it's easier and more performant to check for null rather than using .at inside a loop (and throwing an out of bounds exception by proxy rather than e.g an invalid argument or not at all).
-
-
-
This is a tough one. In similar code in ChaiScript I went through many iterations of checking to see if the element was still in bounds for each access before finally giving up. I ended up making my own range checked string view thing to eliminate the possibility of...
- Još 4 druga odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.