[ET Trac] [Einstein Toolkit] #1536: Wrong code in Piraha.hpp
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Fri Feb 7 12:38:24 CST 2014
#1536: Wrong code in Piraha.hpp
----------------------+-----------------------------------------------------
Reporter: eschnett | Owner:
Type: defect | Status: new
Priority: critical | Milestone:
Component: Cactus | Version: development version
Keywords: |
----------------------+-----------------------------------------------------
Piraha.hpp contains in lines 171 ff the code
{{{
const char c;
Literal(char b) : c(b) {}
bool match(Matcher *m);
std::string fmt() {
std::string s = "literal(";
s += c+")";
return s;
}
}}}
In this code, the expression c+")" adds a character to a pointer, in
effect adding to the pointer. This does not append to the string s, as was
intended.
There seem to be several similar cases in other locations as well.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1536>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list