fix areaid

This commit is contained in:
Andrew Pamment 2018-05-24 14:21:52 +10:00
parent 0f0ba2c368
commit 268ad41ace

View File

@ -284,7 +284,7 @@ void update_config_file_area(int areaid) {
if (ptr != NULL) {
trimwhitespace(bufferw, 256, ptr);
id = atoi(bufferw);
if (id == areaid) {
if (id == areas[areaid]->id) {
fprintf(fptr2, "MSGAREA, %d, %d, %s", areas[areaid]->id, areas[areaid]->hub, areas[areaid]->basedir);
for (i=0;i<areas[areaid]->link_count;i++) {
fprintf(fptr2, ", %d", areas[areaid]->links[i]);