I've just started port and met some problem with pass parameter to strlen() function:Code: [Select]{ const char *test_text[] = { "CHDK'" HDK_VERSION " " BUILD_NUMBER "'" , "Build: " __DATE__ " " __TIME__ , "Camera: " PLATFORM " - " PLATFORMSUB }; unsigned int w; for(i = 0; i< 3; i++) w = strlen(test_text[i]);}w is 0 always.Code: [Select]w = strlen(test_text[0]);w = strlen(tets_text[1]);w = strlen(test_text[2]);w is right...a810 has the same problem (release #0050 [2.59], DIGIC4 for both cams)
{ const char *test_text[] = { "CHDK'" HDK_VERSION " " BUILD_NUMBER "'" , "Build: " __DATE__ " " __TIME__ , "Camera: " PLATFORM " - " PLATFORMSUB }; unsigned int w; for(i = 0; i< 3; i++) w = strlen(test_text[i]);}
w = strlen(test_text[0]);w = strlen(tets_text[1]);w = strlen(test_text[2]);
How are you testing the value of 'w' in the above two test cases?Perhaps post a more complete test code so we can try it on other cameras.
strlen(test_text[i])
QuoteEither your test case is invalid somehow, or something in your build is very very broken.The test code is the same. A compiler is the same. Address of strlen() is right. A800, A495 work fine but A4000, A810 not. What can be wrong? I think the problem is common for some set of functions not only for strlen().
Either your test case is invalid somehow, or something in your build is very very broken.
So whatever your problem is, it's happening on the CHDK side. If the same toolchain works on other cameras, the most likely candidate would probably be memory corruptions of some kind.
Started by alvm General Discussion and Assistance
Started by alvm « 1 2 » Firmware Dumping
Started by alvm Firmware Dumping
Started by bsayrafi « 1 2 » General Discussion and Assistance
Started by elixir General Help and Assistance on using CHDK stable releases