mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
libmp: fix mptov unwanted overflow when shifting
Change-Id: Ia7e970210d9d3b31948b37ee9d2ca6ec6a4a52a8
This commit is contained in:
parent
1fd98d37f5
commit
dd59d6bdc2
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ mptov(mpint *b)
|
|||
|
||||
v = 0ULL;
|
||||
for(s = 0; s < b->top; s++)
|
||||
v |= b->p[s]<<(s*sizeof(mpdigit)*8);
|
||||
v |= (uvlong)b->p[s]<<(s*sizeof(mpdigit)*8);
|
||||
|
||||
if(b->sign > 0){
|
||||
if(v > MAXVLONG)
|
||||
|
|
Loading…
Reference in a new issue