Skip to content

Commit

Permalink
#32 properly detecting end-of-loop condition
Browse files Browse the repository at this point in the history
If the proper end of the loop has been reached, then release object reference
  • Loading branch information
dertseha committed Sep 1, 2018
1 parent 8ab5f62 commit b775e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ss1/content/archive/level/Level.go
Expand Up @@ -294,7 +294,7 @@ func (lvl *Level) removeCrossReferences(start int, next func(ObjectCrossReferenc

obj := lvl.Object(entry.ObjectID)
if obj != nil {
if entry.NextTileForObj == int16(index) {
if entry.NextTileForObj == int16(start) {
obj.CrossReferenceTableIndex = 0
} else if obj.CrossReferenceTableIndex == int16(index) {
obj.CrossReferenceTableIndex = entry.NextTileForObj
Expand Down

0 comments on commit b775e36

Please sign in to comment.