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};
 | 
			
		||||
                    } else {
 | 
			
		||||
                        int last = repo.userMirrors.length;
 | 
			
		||||
                        repo.userMirrors = Arrays.copyOf(repo.userMirrors, last);
 | 
			
		||||
                        repo.userMirrors = Arrays.copyOf(repo.userMirrors, last + 1);
 | 
			
		||||
                        repo.userMirrors[last] = url;
 | 
			
		||||
                    }
 | 
			
		||||
                    values.put(RepoTable.Cols.USER_MIRRORS, Utils.serializeCommaSeparatedString(repo.userMirrors));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user