forked from github/server
bugfix for older versions of data (HSE)
This commit is contained in:
parent
8e91392ed7
commit
3d1bdd4bf4
1 changed files with 10 additions and 2 deletions
|
@ -83,10 +83,18 @@ lc_read(struct attrib * a, FILE* F)
|
||||||
building_action * data = (building_action*)a->data.v;
|
building_action * data = (building_action*)a->data.v;
|
||||||
|
|
||||||
read_building_reference(&data->b, F);
|
read_building_reference(&data->b, F);
|
||||||
fscanf(F, "%s", lbuf);
|
if (global.data_version<UNICODE_VERSION) {
|
||||||
|
freadstr(F, enc_gamedata, lbuf, sizeof(lbuf));
|
||||||
|
} else {
|
||||||
|
fscanf(F, "%s", lbuf);
|
||||||
|
}
|
||||||
data->fname = strdup(lbuf);
|
data->fname = strdup(lbuf);
|
||||||
if (global.data_version>=BACTION_VERSION) {
|
if (global.data_version>=BACTION_VERSION) {
|
||||||
fscanf(F, "%s", lbuf);
|
if (global.data_version<UNICODE_VERSION) {
|
||||||
|
freadstr(F, enc_gamedata, lbuf, sizeof(lbuf));
|
||||||
|
} else {
|
||||||
|
fscanf(F, "%s", lbuf);
|
||||||
|
}
|
||||||
if (strcmp(lbuf, NULLSTRING)==0) data->param = NULL;
|
if (strcmp(lbuf, NULLSTRING)==0) data->param = NULL;
|
||||||
else data->param = strdup(lbuf);
|
else data->param = strdup(lbuf);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue