Mercurial > hg > dmlib
comparison tools/fanalyze.c @ 2040:3a7ce77c7f2d
Fix integer overflows vs. shifts.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 30 Nov 2018 06:51:57 +0200 |
parents | 472ca1dbc2d3 |
children | 493d79ea50a8 |
comparison
equal
deleted
inserted
replaced
2039:210a0041081b | 2040:3a7ce77c7f2d |
---|---|
75 } DMGrepDef; | 75 } DMGrepDef; |
76 | 76 |
77 | 77 |
78 static const DMGrepDef dmGrepTypes[DMGV_last] = | 78 static const DMGrepDef dmGrepTypes[DMGV_last] = |
79 { | 79 { |
80 { "8bit (byte)" , (1UL << 8) - 1, 1 }, | 80 { "8bit (byte)" , (1ULL << 8) - 1, 1 }, |
81 { "16bit (word) LE" , (1UL << 16) - 1, 2 }, | 81 { "16bit (word) LE" , (1ULL << 16) - 1, 2 }, |
82 { "16bit (word) BE" , (1UL << 16) - 1, 2 }, | 82 { "16bit (word) BE" , (1ULL << 16) - 1, 2 }, |
83 { "32bit (word) LE" , (1UL << 32) - 1, 4 }, | 83 { "32bit (word) LE" , (1ULL << 32) - 1, 4 }, |
84 { "32bit (word) BE" , (1UL << 32) - 1, 4 }, | 84 { "32bit (word) BE" , (1ULL << 32) - 1, 4 }, |
85 }; | 85 }; |
86 | 86 |
87 | 87 |
88 enum | 88 enum |
89 { | 89 { |