fix GetIGDBAppParent
This commit is contained in:
parent
543210a4ae
commit
4490c817db
@ -99,16 +99,16 @@ func GetIGDBAppParent(id int) (int, error) {
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
versionParent := detail.VersionParent
|
||||
for versionParent != 0 {
|
||||
detail, err = GetIGDBAppDetailCache(versionParent)
|
||||
hasParent := false
|
||||
for detail.VersionParent != 0 {
|
||||
hasParent = true
|
||||
detail, err = GetIGDBAppDetailCache(detail.VersionParent)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
versionParent = detail.VersionParent
|
||||
}
|
||||
if versionParent != 0 {
|
||||
return versionParent, nil
|
||||
if hasParent {
|
||||
return detail.ID, nil
|
||||
}
|
||||
return id, nil
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user