Closed GoogleCodeExporter closed 9 years ago
wow. thanks for this.
I'll work on adding this to a test case then accept your patch.
Original comment by nickg@client9.com
on 24 Feb 2012 at 5:24
, in cxx_test.cc, the only *not* tested are the ascii copying functions. Damn!
Original comment by nickg@client9.com
on 24 Feb 2012 at 5:44
ok tests added... I'm able to dup the problem
Original comment by nickg@client9.com
on 24 Feb 2012 at 5:57
fixed. Minor bug in your proposed patch.
std::string s(str.size() + 1, '\0'); will end up making a c++ string that thinks it has a null byte as part of the string (,i.e. wrong size() is returned)
I did the following: seems to work and valgrind is happy. What do you think?
inline std::string toupper(const std::string& str)
{
std::string s(str.size(), '\0');
modp_toupper_copy(const_cast<char*>(s.data()), str.data(), str.size());
return s;
}
Thanks again for the report. Hope you are staying warm!
best,
nickg
Original comment by ngalbre...@etsy.com
on 26 Feb 2012 at 4:56
Original comment by nickg@client9.com
on 26 Feb 2012 at 4:57
Original issue reported on code.google.com by
ilya.m...@gmail.com
on 12 Jul 2011 at 11:11