Browse Source

Fix in world.

Godzil 4 years ago
parent
commit
aa078f4d46
1 changed files with 2 additions and 2 deletions
  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]);
         }
     }