octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44662] [OF io] csv2cell.cc miscompiled with O


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #44662] [OF io] csv2cell.cc miscompiled with Octave built for 64-bit windows
Date: Tue, 31 Mar 2015 00:04:04 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #5, bug #44662 (project octave):

csvconcat is failing?  There isn't much in that file.

I worry a bit about these lines in csvconcat.cc:


/* Output real value */
char tmp[20];
sprintf(tmp, "%g", c(i, j).double_value());
word += tmp;


Twenty characters isn't much wider than a double translated to decimal
notation.  It shouldn't be a problem, though.  There might be a C++ streams
method for converting the double_value() without having to use the stack:

http://en.cppreference.com/w/cpp/string/basic_string/to_string

but maybe that is slower.

In any case, I'd say continue adding "std::cout <<" throughout the file with
various messages and there is a good chance it will pinpoint where the failure
occurs.  csvconcat.cc can't go very far before failure.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44662>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]