浏览代码

Fix error: Undeclared name: p

streof 4 年之前
父节点
当前提交
2c71494ad1
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;
 		}
 	}