Hello,
I have the fallowing statement:
vsnprintf(target, size - 1, "%ls_%ls", str16_1, str16_2);
Do you know why this fails on gcc?
I used this on Windows like this:
vsnprintf(target, size - 1, "%S_%S", str16_1, str16_2);
and it's working as expected. On gcc documentation I found that %S is synonym with %ls, but I must not use it. I tried also with %S, but is not working. I use this in a function with variable argument list. Is it possible to not work because I change the format variable that I pass to va_start? I must search %S and replace it with %ls in format variable.
The function is something like:
void f(const char* format, ...){
char* new_format = format with %S replaced with %ls;
va_list argptr;
va_start(args, format);
vsnprintf(str, size-1, new_format, argptr);
}
I checked and new_format is correct.
Thank you!