diff options
-rw-r--r-- | version.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -40,22 +40,22 @@ uint32_t MsiGetFileVersionW(const char16_t *filename, | |||
40 | unsigned char *map = (unsigned char *)mapv; | 40 | unsigned char *map = (unsigned char *)mapv; |
41 | 41 | ||
42 | #define BYTE(offset) ({ \ | 42 | #define BYTE(offset) ({ \ |
43 | size_t _offset = (offset); \ | 43 | size_t _boffset = (offset); \ |
44 | if (_offset >= fsize) goto cleanup; /* outside file bounds */ \ | 44 | if (_boffset >= fsize) goto cleanup; /* outside file bounds */ \ |
45 | map[_offset]; \ | 45 | map[_boffset]; \ |
46 | }) | 46 | }) |
47 | #define WORD16(offset) ({ \ | 47 | #define WORD16(offset) ({ \ |
48 | size_t _offset = (offset); \ | 48 | size_t _woffset = (offset); \ |
49 | uint16_t toret = BYTE(_offset+1); \ | 49 | uint16_t toret = BYTE(_woffset+1); \ |
50 | toret = (toret << 8) | BYTE(_offset+0); \ | 50 | toret = (toret << 8) | BYTE(_woffset+0); \ |
51 | toret; \ | 51 | toret; \ |
52 | }) | 52 | }) |
53 | #define WORD32(offset) ({ \ | 53 | #define WORD32(offset) ({ \ |
54 | size_t _offset = (offset); \ | 54 | size_t _doffset = (offset); \ |
55 | uint16_t toret = BYTE(_offset+3); \ | 55 | uint32_t toret = BYTE(_doffset+3); \ |
56 | toret = (toret << 8) | BYTE(_offset+2); \ | 56 | toret = (toret << 8) | BYTE(_doffset+2); \ |
57 | toret = (toret << 8) | BYTE(_offset+1); \ | 57 | toret = (toret << 8) | BYTE(_doffset+1); \ |
58 | toret = (toret << 8) | BYTE(_offset+0); \ | 58 | toret = (toret << 8) | BYTE(_doffset+0); \ |
59 | toret; \ | 59 | toret; \ |
60 | }) | 60 | }) |
61 | 61 | ||