3 ms·
There's no footgun here except for apps which make false assumptions about argc and/or argv.
by inetknght 5y ago
There's no footgun here except for apps which make false assumptions about argc and/or argv.
- tremon 5y agoIndeed, that's the footgun.
- inetknght 5y agoAt that point using C is the footgun. It's always been the case that argc is not-negative which means it could be zero. It's always been the case that argv[argc] is null. People who assume otherwise are poor C developers.
- zucker42 5y agoYes, C is full of footguns; that's one fact that has motivated the creation of alternate systems programming languages. I think your definition of footgun is different from mine and that of the commenters you're responding to (and how I've generally seen it used).