In C, I get a segfault while doing
const wchar_t *id = L"{{content}}\0";
wprintf(L"%s\n", wcslen(id));
I don't understand what's wrong here... Can someone enlighten me?
In C, I get a segfault while doing
const wchar_t *id = L"{{content}}\0";
wprintf(L"%s\n", wcslen(id));
I don't understand what's wrong here... Can someone enlighten me?
You dereference the pointer converted from size_t, and wprintf expects the pointer for the %s . Use %zu to display the length.