Hi string copy not working with following code
VidZone[Loop].pui8Source = (UINT8 **)malloc(FileCount * sizeof(UINT8 *));
for(FileIndex = 0 ; FileIndex < VidZone[Loop].ui32NoOfSourceFiles ; FileIndex++)
{
VidZone[Loop].pui8Source[FileIndex] = (UINT8 *)malloc(255 * sizeof(UINT8));
strncpy(VidZone[Loop].pui8Source[FileIndex] , pui8SourceString[FileIndex] , 255);
}
"pui8Source" is a double poiner and pui8SourceString[FileIndex]
array of character pointers.
Please let me know if any problem with my code
It is copying for first instance when FileIndex=0 but not for second instance.
Regards,
Anand Shah