memcpy does not copy the data

Posted by user437777 on Stack Overflow See other posts from Stack Overflow or by user437777
Published on 2012-03-23T04:44:24Z Indexed on 2012/03/23 5:30 UTC
Read the original article Hit count: 118

Filed under:
|

I am caught up with a weird problem. I have one build that copies data using memcpy,
while another build does not. I don't understand why, because the relevant file is still the same.

I am using following code:

memcpy(pxCurrentInfo, &pxInfoBuffer->axgInfoBuffer[0], sizeof(tInfo));

Data in pxInfoBuffer is fine. When I check pxCurrentInfo they are all 0s.
tInfo is a structure.

To give a pointer, when I put the break point and change the value

pxCurrentInfo->xDL.eMethod=0

it automatically updates/copies all the correct info from pxInfoBuffer->axgInfoBuffer[0], afterwards. I don't know why.

© Stack Overflow or respective owner

Related posts about c

    Related posts about memcpy