aianlinb / VisualGGPK2

Library for Content.ggpk of PathOfExile (Rewrite of libggpk)
GNU Affero General Public License v3.0
159 stars 32 forks source link

Error reading schemas not defined in schema.min.json (dat file with no fields) #44

Open zaafar opened 1 year ago

zaafar commented 1 year ago

There are some Enums in the schema.min.json with no values e.g.

enum AchievementSets @indexing(first: 0) { _ }

These are different from enums that have values e.g.

enum ActiveSkillTargetTypes @indexing(first: 1) {
  TARGETABLE_GROUND
  ENEMY
  WALKABLE_GROUND
  ANYWHERE_SELF_TARGET
  ITEM
  CORPSE
  _
  NO_LINE_OF_SIGHT
  BEHIND_MONSTER
  SELF_ORIGIN
  ROTATE_TO_TARGET
}

Libggpk2 crashes on these undefined enums as shown below.

image

It would be good if Libggpk2 don't crash on them and just consider them as integer starting from what's given in bracket i.e. (first: 1).

zaafar commented 1 year ago

@aianlinb not even in libggpk3?

aianlinb commented 1 year ago

@zaafar Well... I'll solve it in the future when I have time to continue developing LibGGPK3, LibDat3