mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-04 06:31:54 +00:00 
			
		
		
		
	[c-host] fix bounds checking on frame index
This commit is contained in:
		@@ -160,7 +160,7 @@ static int frameThread(void * opaque)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // we increment the index first so that if we need to repeat a frame
 | 
					    // we increment the index first so that if we need to repeat a frame
 | 
				
			||||||
    // the index still points to the latest valid frame
 | 
					    // the index still points to the latest valid frame
 | 
				
			||||||
    if (app.frameIndex++ == LGMP_Q_FRAME_LEN)
 | 
					    if (++app.frameIndex == LGMP_Q_FRAME_LEN)
 | 
				
			||||||
      app.frameIndex = 0;
 | 
					      app.frameIndex = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    KVMFRFrame * fi = lgmpHostMemPtr(app.frameMemory[app.frameIndex]);
 | 
					    KVMFRFrame * fi = lgmpHostMemPtr(app.frameMemory[app.frameIndex]);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user