--- parser3/src/classes/table.C 2002/12/09 12:19:16 1.170 +++ parser3/src/classes/table.C 2003/04/04 13:44:59 1.173 @@ -1,11 +1,11 @@ /** @file Parser: @b table parser class. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_TABLE_C="$Date: 2002/12/09 12:19:16 $"; +static const char* IDENT_TABLE_C="$Date: 2003/04/04 13:44:59 $"; #include "classes.h" #include "pa_common.h" @@ -450,6 +450,9 @@ static void _sort(Request& r, const Stri false; // default=asc Table& old_table=static_cast(r.get_self())->table(&method_name); + if(old_table.size()==0) + return; + Table& new_table=*new(pool) Table(pool, &method_name, old_table.columns()); Table_seq_item *seq=(Table_seq_item *)pool.malloc(sizeof(Table_seq_item)*old_table.size()); @@ -457,8 +460,6 @@ static void _sort(Request& r, const Stri // calculate key values bool key_values_are_strings=true; - // save 'current' - int saved_current=old_table.current(); for(i=0; i