|
@@ -450,10 +450,16 @@ void module_meta_date_changed::update_map_info(int id)
|
|
log_error("修改地图失败,数据库中找不到: map_id=%d", id);
|
|
log_error("修改地图失败,数据库中找不到: map_id=%d", id);
|
|
return ;
|
|
return ;
|
|
}
|
|
}
|
|
-
|
|
|
|
double scale = 0;
|
|
double scale = 0;
|
|
- DBRes.GetField( "scale",scale, Error );
|
|
|
|
-
|
|
|
|
|
|
+ if (DBRes.GetNextRecod(Error))
|
|
|
|
+ {
|
|
|
|
+ DBRes.GetField("scale", scale, Error);
|
|
|
|
+ }
|
|
|
|
+ if (scale < 1e-4)
|
|
|
|
+ {
|
|
|
|
+ log_error("修改地图,数据库地图比例尺错误: map_id=%d,scale=%.2f", id,scale);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
auto area = area_list::instance()->m_map;
|
|
auto area = area_list::instance()->m_map;
|
|
for(auto& it : area)
|
|
for(auto& it : area)
|
|
{
|
|
{
|