Project

General

Profile

Bug #128 ยป 0009-Qt-Remove-trade_generator-calculate-use-of-VLA.patch

Marko Lindqvist, 01/05/2024 06:13 AM

View differences:

client/gui-qt/menu.cpp
trade_city *tc;
int i;
bool tdone;
int count = cities.size();
int *cities_ids = (int *)fc_malloc(sizeof(int) * count);
trade_city **cities_order = (trade_city **)fc_malloc(sizeof(trade_city *) * count);
for (i = 0; i < 100; i++) {
int count = cities.size();
int cities_ids[count];
class trade_city *cities_order[count];
int n;
tdone = true;
......
}
}
free(cities_ids);
free(cities_order);
gui()->mapview_wdg->repaint();
}
    (1-1/1)