--- parser3/src/main/pa_string.C 2019/12/05 22:54:09 1.261 +++ parser3/src/main/pa_string.C 2020/10/10 06:08:37 1.263 @@ -12,11 +12,11 @@ #include "pa_charset.h" #include "pa_vregex.h" -volatile const char * IDENT_PA_STRING_C="$Id: pa_string.C,v 1.261 2019/12/05 22:54:09 moko Exp $" IDENT_PA_STRING_H; +volatile const char * IDENT_PA_STRING_C="$Id: pa_string.C,v 1.263 2020/10/10 06:08:37 moko Exp $" IDENT_PA_STRING_H; const String String::Empty; -#define COMPILE_ASSERT(x) extern int assert_checker[(int)(x) ? 1 : -1] +#define COMPILE_ASSERT(x) extern int assert_checker[(x) ? 1 : -1] COMPILE_ASSERT(sizeof(String::Languages) == sizeof(CORD)); // pa_atoui is based on Manuel Novoa III _strto_l for uClibc @@ -86,10 +86,16 @@ template inline T pa_ato_any } unsigned int pa_atoui(const char *str, int base, const String* problem_source){ + if(!str) + return 0; + return pa_ato_any(str, base, problem_source, UINT_MAX); } unsigned long long pa_atoul(const char *str, int base, const String* problem_source){ + if(!str) + return 0; + return pa_ato_any(str, base, problem_source, ULLONG_MAX); }