Hi,
In:
size_t wjWUTF8CharSize(char *str, size_t length)
{
size_t r = -1;
There is a bug using size_t, in that you check later for -1.
l = wjWUTF8CharSize(e, length - (e - value));
....
else if (l < 0)
We found that using int instead fixes the problem.
std::string wjUTF8Encode(char *value)
{
size_t length = strlen(value);
char *next;
char *v;
char *e;
int l; //<- change to int
And same thing here:
int wjWUTF8CharSize(char *str, size_t length)
{
int r = -1;
Hi, In: size_t wjWUTF8CharSize(char *str, size_t length) { size_t r = -1; There is a bug using size_t, in that you check later for -1. l = wjWUTF8CharSize(e, length - (e - value)); .... else if (l < 0)
We found that using int instead fixes the problem.
And same thing here:
int wjWUTF8CharSize(char *str, size_t length) { int r = -1;