diff options
author | Simon Tatham <anakin@pobox.com> | 2017-05-16 19:06:37 +0100 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2017-05-16 19:06:37 +0100 |
commit | af3d986af771c8ce6401df5dd69504fb350c7de9 (patch) | |
tree | e1ab5557a1308d82fafaec1f925d89549a686c0d /fake-lib.c | |
parent | f0cdcb370ec7023428bc421e3a8b5f5cbf1de502 (diff) | |
download | wix-on-linux-af3d986af771c8ce6401df5dd69504fb350c7de9.tar.gz wix-on-linux-af3d986af771c8ce6401df5dd69504fb350c7de9.tar.bz2 wix-on-linux-af3d986af771c8ce6401df5dd69504fb350c7de9.zip |
Implement MsiGetFileVersion.
This is pretty ugly code, but it works well enough to deliver the
right versions for the files in my test MSI. I can polish it later.
Diffstat (limited to 'fake-lib.c')
-rw-r--r-- | fake-lib.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -128,3 +128,15 @@ char *dupcat(const char *str, ...) | |||
128 | 128 | ||
129 | return out; | 129 | return out; |
130 | } | 130 | } |
131 | |||
132 | unsigned le(const unsigned char *buf, size_t len, size_t off, size_t nbytes) | ||
133 | { | ||
134 | unsigned toret = 0; | ||
135 | off += nbytes; | ||
136 | while (nbytes-- > 0) { | ||
137 | toret <<= 8; | ||
138 | if (--off < len) | ||
139 | toret |= buf[off]; | ||
140 | } | ||
141 | return toret; | ||
142 | } | ||