Project

General

Profile

Submit #2920 » test_wcsrtombs.c

Test program that reproduces the issue - RockinRoel, 06/08/2016 04:00 AM

 
#include <stdio.h>
#include <string.h>
#include <wchar.h>

int main(int argc, char *argv[])
{
char out[64];
wchar_t *in = L"Hello! \x20AC Hello!";
const wchar_t *inptr = in;
mbstate_t state = {0};

size_t len = wcsrtombs(out, &inptr, sizeof(out), &state);

printf("inptr - in: %d \n", inptr - in);
}
(1-1/3)