@RichFelker We need to just accept it... the C hate is too strong T_T. (I absolutely hate that it's come to this)https://twitter.com/RichFelker/status/709915047842205700 …
@cr1901 There's nothing at all unsafe about C strings if you just follow simple common-sense rules for how to use them.
-
-
@cr1901 Sadly there's always the temptation to take shortcuts even for those of us who know better... -
@RichFelker IIRC strncpy doesn't actually do what one would expect. But no doubt there's a Linux/Windows-specific variant? -
@RichFelker Possibly snprintf is a good bet here if one cares about standards compliance? -
@cr1901 snprintf (or asprintf, easily built on snprintf) is the obvious easy/safe choice for constructing strings in C. -
@RichFelker snprintf is what I used to construct directories on my DOS FTP backup application (would be nice if OpenWatcom had a ver bump) -
@RichFelker So hey, I got something right that Linus didn't :P. Am I smart now?
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.