これの理由は何ですか?ポインタがnullの場合、残りの条件は評価されないと思いました。
// doesn't work:
char *ptr = somefunction();
if (ptr && ptr[0] == '1' || ptr[0] == 't')
// ...
// does work:
char *ptr = somefunction();
if (ptr)
if (ptr[0] == '1' || ptr[0] == 't')
// ...