-
-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unwanted indentation in
StdStream.print
When printing via `StdStream.print` strings containing the null terminator, we were just printing the string until the null terminator and replacing the unprinted characters by padding the printed string with space characters. This behavior made `String.size()` inconsistent with what `fprintf` was really printing. This behavior has been introduced in #1768, which ensure we respected the buffer size. Closes #4171
- Loading branch information
1 parent
f3f3b8d
commit 9d0f44c
Showing
2 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Fix unwanted indentation in `StdStream.print` | ||
|
||
When printing via `StdStream.print` strings containing the null terminator, the | ||
standard library was printing the string until the null terminator and then | ||
padding the printed string with space characters until the string size was | ||
reached. | ||
|
||
That behavior was introduced in release 0.12.0, fixing a left-over from when | ||
Pony strings were null terminated. | ||
|
||
Now the `print` function is effectively printing every character in the string | ||
plus an ending newline character. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters