--- parser3/src/classes/string.C 2003/04/03 10:48:24 1.125.2.15.2.20 +++ parser3/src/classes/string.C 2003/09/29 10:09:35 1.127 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_STRING_C="$Date: 2003/04/03 10:48:24 $"; +static const char* IDENT_STRING_C="$Date: 2003/09/29 10:09:35 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -91,7 +91,7 @@ static void _double(Request& r, MethodPa /*not static*/void _string_format(Request& r, MethodParams& params) { - Value& fmt_maybe_code=*params[0]; + Value& fmt_maybe_code=params[0]; // for some time due to stupid {} in original design const String& fmt=r.process_to_string(fmt_maybe_code); @@ -111,7 +111,8 @@ static void _right(Request& r, MethodPar size_t n=(size_t)params.as_int(0, "n must be int", r); const String& string=GET_SELF(r, VString).string(); - r.write_assign_lang(string.mid(string.length()-n, string.length())); + size_t length=string.length(); + r.write_assign_lang(nkeyL; o++) - if(options->pos(o->keyL)>=0 - || (o->keyU && options->pos(o->keyU)>=0)) { + if(options->pos(o->keyL)!=STRING_NOT_FOUND + || (o->keyU && options->pos(o->keyU)!=STRING_NOT_FOUND)) { if(result & o->checkBit) throw Exception("parser.runtime", options, @@ -311,7 +312,7 @@ static void _match(Request& r, MethodPar String result; VTable* vtable=new VTable; - Replace_action_info info; + Replace_action_info info={0}; info.request=&r; info.src=&src; info.dest=&result; @@ -378,7 +379,7 @@ public: try { got_cell=true; - result.append_help_length(str, length, String::L_TAINTED); + result.append_know_length(str, length, String::L_TAINTED); return false; } catch(...) { error=SQL_Error("exception occured in String_sql_event_handlers::add_row_cell");