Don't set the space defs pointer if there are no defs.

This commit is contained in:
Bill Currie 2011-02-28 23:16:59 +09:00
parent 5d9fbc2d6d
commit bad7078797

View file

@ -513,8 +513,9 @@ qfo_read (QFile *file)
for (i = 0; i < qfo->num_spaces; i++) {
qfo->spaces[i].type = LittleLong (spaces[i].type);
qfo->spaces[i].defs = qfo->defs + LittleLong (spaces[i].defs);
qfo->spaces[i].num_defs = LittleLong (spaces[i].num_defs);
if (qfo->spaces[i].num_defs)
qfo->spaces[i].defs = qfo->defs + LittleLong (spaces[i].defs);
qfo->spaces[i].data_size = LittleLong (spaces[i].data_size);
if (spaces[i].data) {
qfo->spaces[i].d.strings = data + LittleLong (spaces[i].data);