non-blocking-rtttl-arduino icon indicating copy to clipboard operation
non-blocking-rtttl-arduino copied to clipboard

Bug in pop_byte

Open mchughj opened this issue 6 years ago • 1 comments

Your pop_byte routine reads as follows:

		char pop_byte(){
			get_byte(nextPos++);
			/*
			char read = get_byte(nextPos++);
			//Serial.print("Popped: '");
			//Serial.write(read);
			//Serial.println("'");
			return read;
			*/
		}

There is no return here.

Normally I would submit a pull request but if you see the other issue I filed (with the name change) then you can imagine that my pull request would look very odd. Pretty simple bug and fix.

mchughj avatar Jul 19 '19 20:07 mchughj

Strictly speaking the assembly produced by the current version of the code is likely the same as the assembly which would be created by the explicit return (since get_byte puts everything in the right location and the caller function pop_byte ends). Still worth fixing IMO.

mchughj avatar Jul 19 '19 21:07 mchughj