mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-05 20:49:30 +00:00
Don't increment an iterator if it's past the end
Found by coverity
This commit is contained in:
parent
c217ce7a12
commit
9a0512772e
@ -482,10 +482,10 @@ theme::status_item::status_item(const config& cfg) :
|
||||
++c;
|
||||
if(c != rgb_vec.end()){
|
||||
g = (atoi(c->c_str()));
|
||||
++c;
|
||||
}else{
|
||||
g=0;
|
||||
}
|
||||
++c;
|
||||
if(c != rgb_vec.end()){
|
||||
b=(atoi(c->c_str()));
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user