Intent-Code Divergence
Medium
- Confidence
- 98% confidence
- Finding
- The guidance is incorrect: C `strchr` returns a pointer or `NULL`, while Python `s.find(c)` returns an integer index or `-1`. Treating them as having the same not-found behavior can produce logic bugs during migration, especially when index `0` is misinterpreted as false or when `-1` is accidentally used as a valid index in Python, causing incorrect character access and control-flow errors. In a language-migration skill, this is more dangerous because users may systematically propagate the bad mapping across an entire translated codebase.
