Test for end() after lower_bound call before dereferencing!
--HG-- branch : WINDOWSPORT
This commit is contained in:
parent
815da2f590
commit
82295328cc
@ -142,6 +142,8 @@ static inline int whatcc(unsigned int c)
|
|||||||
} else {
|
} else {
|
||||||
vector<unsigned int>::iterator it =
|
vector<unsigned int>::iterator it =
|
||||||
lower_bound(vpuncblocks.begin(), vpuncblocks.end(), c);
|
lower_bound(vpuncblocks.begin(), vpuncblocks.end(), c);
|
||||||
|
if (it == vpuncblocks.end())
|
||||||
|
return LETTER;
|
||||||
if (c == *it)
|
if (c == *it)
|
||||||
return SPACE;
|
return SPACE;
|
||||||
if ((it - vpuncblocks.begin()) % 2 == 1) {
|
if ((it - vpuncblocks.begin()) % 2 == 1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user