mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:02:44 +00:00 
			
		
		
		
	 b738929195
			
		
	
	
		b738929195
		
	
	
	
	
		
			
			`i` is used as the index for 'old lines' in diff generation, not 'new lines'. Using the wrong index would mean that for certain diffs the prefixed context information would have wrong content, and could even result in a crash. Fix this, and add a test for an input which was previously crashing.
		
			
				
	
	
		
			7 lines
		
	
	
	
		
			140 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
	
		
			140 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(TEST_SOURCES
 | |
|     TestDiff.cpp
 | |
| )
 | |
| 
 | |
| foreach(source IN LISTS TEST_SOURCES)
 | |
|     serenity_test("${source}" LibDiff LIBS LibDiff)
 | |
| endforeach()
 |