Skip to content
Snippets Groups Projects
Commit b0a1e7e7 authored by Markus Blatt's avatar Markus Blatt
Browse files

strip last digits in assignment

[[Imported from SVN: r5579]]
parent ee8d8975
No related branches found
No related tags found
No related merge requests found
......@@ -158,7 +158,8 @@ namespace Dune
template<int k>
void bigunsignedint<k>::assign(std::size_t x)
{
int no=std::numeric_limits<std::size_t>::digits/bits;
int no=std::min(static_cast<int>(n),
static_cast<int>(std::numeric_limits<std::size_t>::digits/bits));
for(int i=0; i<no; ++i) {
digit[i] = (x&bitmask);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment