Skip to content

Solve crash when trying to show error with bad separator.#560

Merged
whitequark merged 1 commit intosolvespace:masterfrom
ror3d:master
Mar 12, 2020
Merged

Solve crash when trying to show error with bad separator.#560
whitequark merged 1 commit intosolvespace:masterfrom
ror3d:master

Conversation

@ror3d
Copy link
Copy Markdown
Contributor

@ror3d ror3d commented Mar 12, 2020

This should solve #490

The problem was that the message box tries to split the description string after the first dot or colon, but if there is only a single dot at the very end of the string, when calling isspace(*it), the value of *it is \0 and crashes.

…, a single dot or colon at the end of the error string.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 12, 2020

CLA assistant check
All committers have signed the CLA.

@whitequark whitequark linked an issue Mar 12, 2020 that may be closed by this pull request
@whitequark whitequark merged commit a6c34bb into solvespace:master Mar 12, 2020
@whitequark
Copy link
Copy Markdown
Contributor

Thanks!

@ror3d
Copy link
Copy Markdown
Contributor Author

ror3d commented Mar 12, 2020

Happy to help!

I've been using this for some days now and it's the simplest/most functional thing out there that does both 2D and 3D, and I really like that it doesn't try to do everything while having broken stuff everywhere. For its simplicity I think I can even contribute to it without spending weeks trying to understand the source, so expect some more PRs in the future, possibly :)

@whitequark
Copy link
Copy Markdown
Contributor

For its simplicity I think I can even contribute to it without spending weeks trying to understand the source, so expect some more PRs in the future, possibly :)

A word of caution: it has a highly interdepenent implementation with a lot of hidden assumptions. Hack away, but note that anything you do that touches the core will probably have unintended consequences. I did my best to improve the situation but it's not much (yet).

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

Successfully merging this pull request may close these issues.

Crash instead of "can't do that operation" dialog in AppVeyor build

3 participants