mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-26 04:49:02 +08:00
55112eb54a
* Add mchehab/zbar * Quote all paths Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> * Update to 0.23.90 * Flip name * Update version registry Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>
22 lines
640 B
Diff
22 lines
640 B
Diff
diff --git a/zbar/decoder.c b/zbar/decoder.c
|
|
index 7f7336f..e9ffc45 100644
|
|
--- a/zbar/decoder.c
|
|
+++ b/zbar/decoder.c
|
|
@@ -25,6 +25,7 @@
|
|
#include <stdlib.h> /* malloc, calloc, free */
|
|
#include <stdio.h> /* snprintf */
|
|
#include <string.h> /* memset, strlen */
|
|
+#include <stddef.h> /* offsetof */
|
|
|
|
#include <zbar.h>
|
|
|
|
@@ -113,7 +114,7 @@ void zbar_decoder_destroy (zbar_decoder_t *dcode)
|
|
|
|
void zbar_decoder_reset (zbar_decoder_t *dcode)
|
|
{
|
|
- memset(dcode, 0, (long)&dcode->buf_alloc - (long)dcode);
|
|
+ memset(dcode, 0, offsetof(zbar_decoder_t, buf_alloc));
|
|
#if ENABLE_EAN == 1
|
|
ean_reset(&dcode->ean);
|
|
#endif
|