GetButtonDown stuck in a loop? javascript included

The weapon switch is in an infinite loop when the button is pressed… only suppose to switch to secondary weapon.

if (Input.GetButtonDown("Switch") > 0 && canSwitch){
	    weaponToSelect++;
	if (weaponToSelect > (weaponsInUse.length - 1)){
	    weaponToSelect = 0;
	}
	DeselectWeapon();
}

if (Input.GetButtonDown("Switch") < 0 && canSwitch){
	weaponToSelect--;
	if (weaponToSelect < 0){
		weaponToSelect = weaponsInUse.length - 1;
	}
	DeselectWeapon();
}

I’m going to just assume you are using the triggers on the controller. If you read the information from the community wiki, you will see that triggers are accessed by GetAxis not GetButtonDown.

GetAxis Indicates whether the left trigger is pressed when GetAxis(“switch”) returns 0 to -1 and the right trigger with 0 to 1. Please adjust your code to use GetAxis instead.

If you don’t intend on marking answers correct i’m moving on.