Bug 72 - SR_GHZ et al don't work properly for large numbers
Summary: SR_GHZ et al don't work properly for large numbers
Status: RESOLVED FIXED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Portability (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Uwe Hermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-09 11:02 CET by Uwe Hermann
Modified: 2013-03-09 12:26 CET (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2013-03-09 11:02:39 CET
SR_GHZ and the other macros need a ULL suffix for the numbers, otherwise integer overflows can happen and the result will not be correct.

E.g. SR_GHZ(5) will overflow without this.
Comment 1 Uwe Hermann 2013-03-09 12:26:21 CET
Fixed in 0b4b41eed84be29e21b0e65c8072b546b4fdd37e.