# HG changeset patch # User jwe # Date 1151682640 0 # Node ID a0218194daa68473e122fc0668b7e688c7f95480 # Parent 6a23ee71dd8682c4d50b3557015848956cd0d089 [project @ 2006-06-30 15:50:40 by jwe] diff -r 6a23ee71dd86 -r a0218194daa6 liboctave/ChangeLog --- a/liboctave/ChangeLog Thu Jun 29 18:04:21 2006 +0000 +++ b/liboctave/ChangeLog Fri Jun 30 15:50:40 2006 +0000 @@ -1,3 +1,8 @@ +2006-06-30 John W. Eaton + + * data-conv.cc (data_conv::string_to_data_type): + Correctly handle leading "*". + 2006-06-29 Atsushi Kajita * Sparse.cc (Sparse::SparseRep::elem): Avoid out of bounds diff -r 6a23ee71dd86 -r a0218194daa6 liboctave/data-conv.cc --- a/liboctave/data-conv.cc Thu Jun 29 18:04:21 2006 +0000 +++ b/liboctave/data-conv.cc Fri Jun 30 15:50:40 2006 +0000 @@ -297,15 +297,21 @@ { if (s[pos+1] == '>') { + std::string s1; + if (input_is_output) { input_is_output = false; + s1 = s.substr (1, pos-1); + (*current_liboctave_warning_handler) ("warning: ignoring leading * in fread precision"); } + else + s1 = s.substr (0, pos); - input_type = string_to_data_type (s.substr (0, pos)); + input_type = string_to_data_type (s1); output_type = string_to_data_type (s.substr (pos+2)); } else @@ -314,6 +320,9 @@ } else { + if (input_is_output) + s = s.substr (1); + input_type = string_to_data_type (s); if (input_is_output)