vswprintf crashes


using symbian s60 5th book sdk expelled october 2nd, i am compiling/running(on sim) following formula snippet:



void test(wchar_t *dest, int size, const wchar_t *fmt, ...) {
va_list vl;
va_start(vl, fmt);
vswprintf(dest, size, fmt, vl);
va_end(vl);
}

...

wchar_t str[1024];

// crashes (2nd twine 123 characters (+ \0) equals 248 bytes)
test(str, 1024, l"msg: %s", l"this exam messagethis exam messagethis exam messagethis exam messagethis exam messagethis tes");

// works (2nd twine 122 characters (+ \0) equals 246 bytes)
test(str, 1024, l"msg: %s", l"this exam messagethis exam messagethis exam messagethis exam messagethis exam messagethis te");


for reason apparent me (even after carrying review male page hundred times) i figure out since formula crashing me vswprintf enlarged strings :-( accurate same formula works glorious linux box. there sufficient memory allocated str, and vswprintf checking aegis overruns anyway. unfortunately ... s60 debugger does smack crash, i have sum :-(



does anybody have any ideas?



assuming bug symbian's vswprintf routine, illusory deputy functions controlling posix agreeable code? (this ostensible cross-platform library)



thanks.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?