Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in pop_byte #5

Open
mchughj opened this issue Jul 19, 2019 · 1 comment
Open

Bug in pop_byte #5

mchughj opened this issue Jul 19, 2019 · 1 comment

Comments

@mchughj
Copy link

mchughj commented Jul 19, 2019

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
Copy link
Author

mchughj commented Jul 19, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant