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

fix routing on windows. #208

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

luca-schlecker
Copy link
Collaborator

@luca-schlecker luca-schlecker commented Aug 23, 2021

It seems like the blueprints feature broke crow on some (at least mine) windows machines.

On my linux instance, executing pop_back on an empty vector doesn't seem to do anything. On my windows instance though, it crashes the program. This PR just checks if the blueprints-vector is empty and only if it isn't, removes an item.

It is undefined behavior to use pop_back on an empty vector and should be avoided.

include/crow/routing.h Outdated Show resolved Hide resolved
@The-EDev The-EDev added the bug Something isn't working label Aug 24, 2021
Copy link
Member

@The-EDev The-EDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Will merge once CI is done

@The-EDev The-EDev merged commit 7ce2433 into CrowCpp:master Aug 25, 2021
@luca-schlecker luca-schlecker deleted the blueprint-fix-windows branch August 25, 2021 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants