Function being called twice when it shouldn't be

Alright so I’ve got a jump function and for some reason it can be called more then once (causing superjumps). This happens more often on hills. Problem is my code shouldn’t even let that happen so I have no idea how to fix it.

In function FixedUpdate (I’m gonna change it to update when I clean up my code) I have this:

if (!Stunned && Grounded && Input.GetButtonDown("Jump") && !IsJumping)
		Jump ();
		IsJumping = true;

Pretty self explanatory. The problem in my jump function is from these lines of code:

		if (!Grounded)
			LeftGround = true;
		if (Grounded && LeftGround)
			IsJumping = false;
			//other code stopping the Jump function that's not important is here

That section of code is in a for loop using yield new WaitForFixedUpdate() at the end. I wanted the function to cancel when they land and doing it this way prevented the function from cancelling instantly.

So, any ideas as to what is causing the problem? I just can’t see how it can be called twice due to IsJump so I’m clueless.

Input.Whatever does not get reset until the next ‘Update’ call! This means that if you are experiencing low frame rates, you can have two calls to ‘FixedUpdate’ that both receive the same buttonpress. As you suspected, moving this stuff to ‘Update’ is itself a fix.