[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43351] format + crashes the GUI
From: |
Andreas Weber |
Subject: |
[Octave-bug-tracker] [bug #43351] format + crashes the GUI |
Date: |
Sat, 04 Oct 2014 10:27:22 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.1.0 |
Follow-up Comment #4, bug #43351 (project octave):
In pr-output.cc the chars for "format plus" are defined as
// First char for > 0, second for < 0, third for == 0.
static std::string plus_format_chars = "+ ";
(not as "+- " as matlab does but this isn't the problem here, only a ML
incompatibility)
I think the problem is in ov-base-mat.cc:479 (default branch)
std::ostringstream buf;
octave_print_internal (buf, matrix(j*nr+i));
std::string tmp = buf.str ();
size_t pos = tmp.find_first_not_of (" ");
os << tmp.substr (pos);
where "size_t pos = tmp.find_first_not_of (" ");" returns "string::npos" (not
found) and then "os << tmp.substr (pos);" throws a out_of_range which isn't
cached.
The same problem is also in ov-base-scalar.cc for "a=-1;format +"
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43351>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, anonymous, 2014/10/03
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Torsten, 2014/10/04
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Philip Nienhuis, 2014/10/04
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Philip Nienhuis, 2014/10/04
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI,
Andreas Weber <=
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Andreas Weber, 2014/10/05
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Andreas Weber, 2014/10/05
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Philip Nienhuis, 2014/10/05
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Andreas Weber, 2014/10/07
- [Octave-bug-tracker] [bug #43351] format + crashes the GUI, Andreas Weber, 2014/10/07