Hello,
We trying migrate a visual studio cpp code to code composer and encouter a problem while doing it.
We have s struct:
typedef struct {
int width;
int height;
unsigned char * data;
} ColorComponent;
and a function that does as follows:
if( ! ( cc->data = new unsigned char[cc->width * cc->height]))
{
fprintf(stderr, "\nERROR: memory allocation failed!\n\n");
exit(-1);
}
Now, in VS2008 everything works great, but in CCS, in debug mode we "entering the if statement".
Why does it happens? the cc->width and cc->height have values, also, if we change the whole "cc->width * cc->height" to a value (such as 300) everything works fine.
P.S in VS2008 when we check the if statement we entering the new.cpp project, in CSS we don't (the STEP INSIDE doesn't enter to new.cpp). is this happens "undercover" and i can't see it?
Thank you very much.