Fixing C strings

from blog thasso.xyz, | ↗ original
It’s well-known that null-terminated C strings are bug-prone and unsafe to use. They’re the stereotypical footgun. I’ve been tinkering in a bare-metal environment recently, writing all code myself, including the common types and routines you find in libc or similar. In all the code I wrote, there is not at single null-terminated string, and I...