A strange loop crash in android platform

A strange loop crash in android platform
0.0 0


Hello folks,

I have a cocos2dx client program which runs successful in windows platform.

But when I try to transplant this program to android platform, crash happened when a “for” loop statement is executed.

for loop statement as follows:

typedef unsigned char BYTE;
typedef unsigned int uint32;
typedef unsigned long DWORD;
typedef unsigned short WORD;

const DWORD dwPasswordKey = ((DWORD)(((WORD)(wPasswordKey)) | ((DWORD)((WORD)(wPasswordKey))) << 16));
BYTE* pSrc = (BYTE**)buf;
uint32 dwRemainDiv4 = size / 4;
DWORD** pdwDest = (DWORD*)buf;

for ( uint32 i = 0; i < dwRemainDiv4; i++ )
pdwDest[i] = pdwSrc[i] ^ dwPasswordKey;

I really can’t find what’s wrong…
Thanks in advance to anyone willing to help me :slight_smile: