--- parser3/src/classes/string.C 2025/12/15 23:07:29 1.264 +++ parser3/src/classes/string.C 2026/04/25 13:38:46 1.267 @@ -1,7 +1,7 @@ /** @file Parser: @b string parser class. - Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian */ @@ -22,7 +22,7 @@ #include "pa_vregex.h" #include "pa_charsets.h" -volatile const char * IDENT_STRING_C="$Id: string.C,v 1.264 2025/12/15 23:07:29 moko Exp $"; +volatile const char * IDENT_STRING_C="$Id: string.C,v 1.267 2026/04/25 13:38:46 moko Exp $"; // class @@ -65,7 +65,7 @@ static const String match_var_name(MATCH // methods static void _length(Request& r, MethodParams&) { - double result=GET_SELF(r, VString).string().length(r.charsets.source()); + double result=(double)GET_SELF(r, VString).string().length(r.charsets.source()); r.write(*new VDouble(result)); } @@ -74,15 +74,15 @@ static void _int(Request& r, MethodParam if(self_string.is_empty()) { if(params.count()>0) - r.write(*new VInt(params.as_int(0, "default must be int", r))); // (default) + r.write(*new VInt(params.as_wint(0, "default must be int", r))); // (default) else throw Exception(PARSER_RUNTIME, 0, "unable to convert empty string without default specified"); } else { try { - r.write(*new VInt(self_string.as_int())); + r.write(*new VInt(self_string.as_wint())); } catch(...) { // convert problem if(params.count()>0) - r.write(*new VInt(params.as_int(0, "default must be int", r))); // (default) + r.write(*new VInt(params.as_wint(0, "default must be int", r))); // (default) else rethrow; // we have a problem when no default }