]> https://gitweb.dealii.org/ - dealii.git/commit
Fixes possible error on "Vector<Number>::add(..)".
authorTulio Ligneul <tulio@petrosoftdesign.com>
Mon, 21 Aug 2017 00:25:59 +0000 (21:25 -0300)
committerDavid Wells <wellsd2@rpi.edu>
Sun, 27 Aug 2017 23:31:35 +0000 (19:31 -0400)
commit547602adeb073d6879af4cf5c0097581e5aeaa06
tree23e9c588e642810d2a7294c5a70ee38d16d4cfdd
parent32bc78504f64fc6327d33589f7f50f8c7fea53e9
Fixes possible error on "Vector<Number>::add(..)".

In "Vector<Number>::add(..)", a pointer to the first element of the
std::vectors was gotten, for instance, by &indices[0], which implies
that the first element of the vector exists. Therefore, if an empty
vector was used, while this works on gcc, this would result in a crash
when using Visual Studio. In this case, the pointer should be gotten by
std::vector::data(). This fix changes de former by the latter access form.
include/deal.II/lac/vector.h

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.