1
0
Fork 0

don't write past end of buffer

This commit is contained in:
mfranz 2009-05-23 11:13:29 +00:00 committed by Tim Moore
parent 513e689a4e
commit 70dea9a2c1

View file

@ -207,7 +207,7 @@ void FGClouds::buildLayer(int iLayer, const string& name, double alt, double cov
char variety_name[50];
do {
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) );
totalCount += count;