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

Set null terminator in String.from_iso_array (issue #1435) #1436

Merged
merged 2 commits into from
Nov 22, 2016
Merged

Set null terminator in String.from_iso_array (issue #1435) #1436

merged 2 commits into from
Nov 22, 2016

Conversation

Perelandric
Copy link
Contributor

@Perelandric Perelandric commented Nov 22, 2016

When the Array[U8] passed to String.from_iso_array has pre-allocated
space, the first pre-allocated byte (the one at the _size index) should
be set to 0 in order to be compliant with how is_null_terminated
does its check. This PR sets that byte in such a case.

Fixes #1435

When the `Array[U8]` passed to `String.from_iso_array` has pre-allocated
space, the first pre-allocated bit (the one at the `_size` index) should
be set to `0` in order to be compliant with how `is_null_terminated`
does its check. This PR sets that bit in such a case.
@Perelandric
Copy link
Contributor Author

One of the tests is commented out because it relies on the String.space fix, which relies on the String.is_null_terminated fix, which relies on this fix. I'll enable that test in a separate PR after/assuming all this stuff gets merged.

@Perelandric Perelandric changed the title Set null terminator bit in String.from_iso_array (issue #1435) Set null terminator in String.from_iso_array (issue #1435) Nov 22, 2016
@Perelandric
Copy link
Contributor Author

Perelandric commented Nov 22, 2016

Apparent unrelated failure on Travis with:

The command "make CC=$CC1 CXX=$CXX1 test-ci" exited with 2.

Done. Your build exited with 1.

/Users/travis/build.sh: line 148: shell_session_update: command not found

@Praetonus
Copy link
Member

The linker failure above that is disturbing. I'll restart the build to see if it fails again.

@Perelandric
Copy link
Contributor Author

Thanks @Praetonus, looks like that did the trick.

@jemc jemc added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Nov 22, 2016
@jemc
Copy link
Member

jemc commented Nov 22, 2016

@Perelandric thanks for going down this rabbit hole and taking care of these issues! It's much appreciated!

@jemc jemc merged commit 3428223 into ponylang:master Nov 22, 2016
ponylang-main added a commit that referenced this pull request Nov 22, 2016
@Perelandric Perelandric deleted the fix_from_iso_array branch November 22, 2016 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants