Problem 1643 - TestEm10 barr90.mac integer overflow at Em10SteppingAction.cc:81
Summary: TestEm10 barr90.mac integer overflow at Em10SteppingAction.cc:81
Status: RESOLVED FIXED
Alias: None
Product: Examples/Extended
Classification: Unclassified
Component: electromagnetic/TestEM10 (show other problems)
Version: 10.0
Hardware: PC Linux
: P5 minor
Assignee: Vladimir.Grichine
URL:
Depends on:
Blocks:
 
Reported: 2014-06-21 17:42 CEST by Vittorio Zecca
Modified: 2014-07-07 14:39 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Vittorio Zecca 2014-06-21 17:42:10 CEST
Running TestEm10 barr90.mac I get an integer overflow at Em10SteppingAction.cc:81
"IDnow = evno+10000*trackID+100000000*parentID;"
because parentID becomes 48 and multiplication result is too large.
My suggested fix is define IDnow and IDold as G4long, then use 100000000L.
Comment 1 Vladimir.Grichine 2014-07-07 14:39:47 CEST
G4int -> G4long for IDnow,IDold.