We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f956f1 commit f279f35Copy full SHA for f279f35
src/idioms/ffi/accepting-strings.md
@@ -118,7 +118,7 @@ This code is inferior to the original in two respects:
118
1. There is much more `unsafe` code, and more importantly, more invariants it
119
must uphold.
120
2. Due to the extensive arithmetic required, there is a bug in this version that
121
- cases Rust `undefined behaviour`.
+ causes Rust `undefined behaviour`.
122
123
The bug here is a simple mistake in pointer arithmetic: the string was copied,
124
all `msg_len` bytes of it. However, the `NUL` terminator at the end was not.
0 commit comments