Browse Source

Fix error: Undeclared name: p

streof 4 years ago
parent
commit
2c71494ad1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/container/ring.odin

+ 1 - 1
core/container/ring.odin

@@ -64,7 +64,7 @@ ring_len :: proc(r: ^$R/Ring) -> int {
 	n := 0;
 	if r != nil {
 		n = 1;
-		for p := ring_next(&p); p != r; p = p.next {
+		for p := ring_next(r); p != r; p = p.next {
 			n += 1;
 		}
 	}