garrynewman / GWEN

Abandoned: GWEN - GUI Without Extravagant Nonsense.
MIT License
427 stars 102 forks source link

Fix: throw of an uncontrolled std::out_of_range exception in RichLabel.cpp #81

Closed qehgt closed 10 years ago

qehgt commented 11 years ago

std::string::substr throws std::out_of_range if starting position is bigger than length of a string. So, it's necessary to check the position before the call.