瀏覽代碼

Fix in world.

Godzil 4 年之前
父節點
當前提交
aa078f4d46
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      source/world.cpp

+ 2 - 2
source/world.cpp

@@ -83,9 +83,9 @@ Intersect World::intersect(Ray r)
     {
         Intersect xs = this->objectList[i]->intersect(r);
 
-        for(j = 0; xs.count(); j++)
+        for(j = 0; j < xs.count(); j++)
         {
-            ret.add(xs[i]);
+            ret.add(xs[j]);
         }
     }