mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Fix topological sort.
This commit is contained in:
1 parent
adadb0fd5a
commit
62811d440d
1 file changed
+4
-1
+4
-1
@@ -33,8 +33,11 @@ func tssVisit(dst []*Struct, n *Struct, byName map[t.ID]*Struct, marks map[*Stru
|
||||
temporary = 1
|
||||
permanent = 2
|
||||
)
|
||||
if marks[n] == temporary {
|
||||
switch marks[n] {
|
||||
case temporary:
|
||||
return nil, false
|
||||
case permanent:
|
||||
return dst, true
|
||||
}
|
||||
marks[n] = temporary
|
||||
|
||||
|
||||
Reference in new issue
Block a user