fix off-by-one error when adding user mirrors to an existing repo
This commit is contained in:
		
							parent
							
								
									90748a3685
								
							
						
					
					
						commit
						1a7c73064f
					
				| @ -785,7 +785,7 @@ public class ManageReposActivity extends AppCompatActivity | |||||||
|                         repo.userMirrors = new String[]{url}; |                         repo.userMirrors = new String[]{url}; | ||||||
|                     } else { |                     } else { | ||||||
|                         int last = repo.userMirrors.length; |                         int last = repo.userMirrors.length; | ||||||
|                         repo.userMirrors = Arrays.copyOf(repo.userMirrors, last); |                         repo.userMirrors = Arrays.copyOf(repo.userMirrors, last + 1); | ||||||
|                         repo.userMirrors[last] = url; |                         repo.userMirrors[last] = url; | ||||||
|                     } |                     } | ||||||
|                     values.put(RepoTable.Cols.USER_MIRRORS, Utils.serializeCommaSeparatedString(repo.userMirrors)); |                     values.put(RepoTable.Cols.USER_MIRRORS, Utils.serializeCommaSeparatedString(repo.userMirrors)); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Hans-Christoph Steiner
						Hans-Christoph Steiner