shithub: sl

Download patch

ref: 53b8237c1af6a8764d760357f98e77c2fbc7100c
parent: a969b42b0d893df35c38956a6f433b515bbdaf58
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Feb 2 22:05:37 EST 2025

vtomp: fix wrong cast (mpdigit can be 32-bit)

--- a/3rd/mp/mptov.c
+++ b/3rd/mp/mptov.c
@@ -19,7 +19,7 @@
 		mpbits(b, VLDIGITS*Dbits);
 	if(v == INT64_MIN){
 		b->sign = -1;
-		uv = (mpdigit)INT64_MAX+1;
+		uv = (uint64_t)INT64_MAX+1;
 	}else{
 		b->sign = (v >> (sizeof(v)*8 - 1)) | 1;
 		uv = v * b->sign;