android - C++ code cross compiling to ARM, runtime crash -


I am fixing a bug about the Android Multimedia Framework C ++ Lib When the code running system goto crashes.

  if (((* pChar)> = _T ('A')) & amp; ((* pChar) & lt; = _T ('z'))) {nFrameTime ++; } NFrameTime is the int type; PChar is wchar_t * type;   

But when I am modifying the code in:

  if (((* pChar)> = _T ('A')). | ((* PChar) & lt; = _T ('z'))) {nFrameTime ++; }   

Everything is okay to me "& amp; amp; or" || ", I just want to know why that accident can cause me some suggestions? < / P>

most likely pchhar is not the only thing on valid data Which can actually cause an accident (excluding compiler bugs).

The real secret is therefore not changed is crashing.

As my answer to the question , this is It may be that when you change the code, it modifies things that the garbage in pChar indicates a valid memory location is another possibility, as Ben Voigat pointed out in the comment, that the second edition Is being removed in, because any value on * pChar is true .

Comments