Fixed issue #25: invalid file cnt and sel in thumb mode
This commit is contained in:
		
							parent
							
								
									1cdbeb972a
								
							
						
					
					
						commit
						ac1300ae00
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| VERSION = git-20111027 | VERSION = git-20111031 | ||||||
| 
 | 
 | ||||||
| CC      = gcc | CC      = gcc | ||||||
| CFLAGS  = -ansi -Wall -pedantic -O2 | CFLAGS  = -ansi -Wall -pedantic -O2 | ||||||
|  | |||||||
| @ -69,7 +69,10 @@ bool it_switch_mode(arg_t a) { | |||||||
| 			img.slideshow = false; | 			img.slideshow = false; | ||||||
| 			reset_timeout(slideshow); | 			reset_timeout(slideshow); | ||||||
| 		} | 		} | ||||||
|  | 		if (fileidx < tns.cnt) | ||||||
| 			tns.sel = fileidx; | 			tns.sel = fileidx; | ||||||
|  | 		else | ||||||
|  | 			tns.sel = tns.cnt > 0 ? tns.cnt - 1 : 0; | ||||||
| 		tns.dirty = true; | 		tns.dirty = true; | ||||||
| 		mode = MODE_THUMB; | 		mode = MODE_THUMB; | ||||||
| 	} else { | 	} else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert Münnich
						Bert Münnich