xmf-xmodeler / Mosaic

Java client for XMF2
0 stars 2 forks source link

Strange Integer Overflow #95

Closed dtoepel closed 7 years ago

dtoepel commented 7 years ago

[1] XMF> (1000*100000000); 100000000000 [1] XMF> (1000*10000000); 1410065408 [1] XMF> (1000*1000000); 1000000000

Overflow detection/prediction goes wrong

dtoepel commented 7 years ago

Probably solved

Replaced long l = i j; with long l = ((long)i) ((long)j);

Upload later...

dtoepel commented 7 years ago

Done, https://github.com/xmf-xmodeler/XMF/commit/19bf220883746b6a8cd2a68336a4df0e6c8a2086 repaired add & sub as well