]> sigrok.org Git - libsigrok.git/commitdiff
output/vcd: use larger data type to internally store frequency
authorGerhard Sittig <redacted>
Sun, 21 Oct 2018 13:40:55 +0000 (15:40 +0200)
committerUwe Hermann <redacted>
Sat, 21 Dec 2019 16:19:50 +0000 (17:19 +0100)
The 'period' member of the VCD output module's context is supposed to
hold frequencies that correspond to the timescale used during export.
An 'int' (in combination with VCD's 1/10/100 constraint) thus would
result in a 1GHz limit, use uint64_t instead to support higher rates.

src/output/vcd.c

index 561b3ba059fc914583b85c0b01901a5490f62e7f..80b2c34a2bca03f74e687b6f86b6276b13d174b9 100644 (file)
@@ -31,7 +31,7 @@ struct context {
        int num_enabled_channels;
        uint8_t *prevsample;
        gboolean header_done;
-       int period;
+       uint64_t period;
        int *channel_index;
        uint64_t samplerate;
        uint64_t samplecount;