Skip to content

Commit f279f35

Browse files
Update accepting-strings.md (#466)
Co-authored-by: simonsan <[email protected]>
1 parent 0f956f1 commit f279f35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/idioms/ffi/accepting-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ This code is inferior to the original in two respects:
118118
1. There is much more `unsafe` code, and more importantly, more invariants it
119119
must uphold.
120120
2. Due to the extensive arithmetic required, there is a bug in this version that
121-
cases Rust `undefined behaviour`.
121+
causes Rust `undefined behaviour`.
122122

123123
The bug here is a simple mistake in pointer arithmetic: the string was copied,
124124
all `msg_len` bytes of it. However, the `NUL` terminator at the end was not.

0 commit comments

Comments
 (0)