don't write past end of buffer
This commit is contained in:
parent
513e689a4e
commit
70dea9a2c1
1 changed files with 1 additions and 1 deletions
|
@ -207,7 +207,7 @@ void FGClouds::buildLayer(int iLayer, const string& name, double alt, double cov
|
||||||
char variety_name[50];
|
char variety_name[50];
|
||||||
do {
|
do {
|
||||||
variety++;
|
variety++;
|
||||||
snprintf(variety_name, sizeof(variety_name), cloud_name.c_str(), variety);
|
snprintf(variety_name, sizeof(variety_name) - 1, cloud_name.c_str(), variety);
|
||||||
} while( box_def_root->getChild(variety_name, 0, false) );
|
} while( box_def_root->getChild(variety_name, 0, false) );
|
||||||
|
|
||||||
totalCount += count;
|
totalCount += count;
|
||||||
|
|
Loading…
Reference in a new issue