mirror of
				https://github.com/Ukendio/jecs.git
				synced 2025-11-03 18:39:19 +00:00 
			
		
		
		
	Return nil if nth is over count
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	
This commit is contained in:
		
							parent
							
								
									3cfce10a4a
								
							
						
					
					
						commit
						0b6bfea5c8
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -733,7 +733,7 @@ local function world_target(world: world, entity: i53, relation: i53, index: num
 | 
				
			||||||
	local nth = index or 0
 | 
						local nth = index or 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if nth >= count then
 | 
						if nth >= count then
 | 
				
			||||||
		nth = nth + count + 1
 | 
							return nil
 | 
				
			||||||
	end
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	nth = archetype.types[nth + idr.records[archetype_id]]
 | 
						nth = archetype.types[nth + idr.records[archetype_id]]
 | 
				
			||||||
| 
						 | 
					@ -2759,7 +2759,7 @@ local function world_new()
 | 
				
			||||||
		local nth = index or 0
 | 
							local nth = index or 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if nth >= count then
 | 
							if nth >= count then
 | 
				
			||||||
			nth = nth + count + 1
 | 
								return nil
 | 
				
			||||||
		end
 | 
							end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		nth = archetype.types[nth + idr.records[archetype_id]]
 | 
							nth = archetype.types[nth + idr.records[archetype_id]]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue