--- parser3/src/lib/punycode/pa_idna.c 2015/04/14 21:42:52 1.1 +++ parser3/src/lib/punycode/pa_idna.c 2023/09/26 20:49:09 1.8 @@ -1,6 +1,6 @@ /** @file Parser: IDNA support, modified Libidn Version 1.28. - Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) */ /* idna.c --- Prototypes for Internationalized Domain Name library. @@ -35,10 +35,14 @@ #include "pa_punycode.h" #include "pa_idna.h" -volatile const char * IDENT_PA_IDNA_C="$Id: pa_idna.c,v 1.1 2015/04/14 21:42:52 moko Exp $"; +volatile const char * IDENT_PA_IDNA_C="$Id: pa_idna.c,v 1.8 2023/09/26 20:49:09 moko Exp $"; #define DOTP(c) ((c) == 0x002E || (c) == 0x3002 || (c) == 0xFF0E || (c) == 0xFF61) +#ifdef _MSC_VER +# define strncasecmp _strnicmp +#endif + /* Core functions */ /** @@ -120,7 +124,7 @@ static int idna_to_ascii_4i_internal (co /* copy string to output buffer if we are about to skip to step8 */ for (i = 0; i < len; i++) - out[i]=src[i]; + out[i]=(char)src[i]; out[len] = '\0'; goto step8; } @@ -303,7 +307,7 @@ int pa_idna_to_unicode_4z (const char *i size_t add_len; do { - for (end = start; *end && !DOTP (*end); end++); + for (end = start; *end && (*end != '.'); end++); if (end > start) { add_len=out_len;